void () { assertNull(myFS.findFileByPath("wrong_path")); if (SystemInfo.isWindows) { String systemDrive = System.getenv("SystemDrive"); VirtualFile root = myFS.findFileByPath(systemDrive.toLowerCase(Locale.ENGLISH)); assertNotNull(root); assertEquals(systemDrive.toUpperCase(Locale.ENGLISH) + '/', root.getPath()); VirtualFile root2 = myFS.findFileByPath(systemDrive.toUpperCase(Locale.ENGLISH) + '\\'); assertSame(String.valueOf(root), root, root2); VirtualFileManager fm = VirtualFileManager.getInstance(); root = fm.findFileByUrl("file://" + systemDrive.toUpperCase(Locale.ENGLISH) + '/'); assertNotNull(root); root2 = fm.findFileByUrl("file:///" + systemDrive.toLowerCase(Locale.ENGLISH) + '/'); assertSame(String.valueOf(root), root, root2); assertNull(myFS.findFileByPath("\\\\some-unc-server")); assertNull(myFS.findFileByPath("//SOME-UNC-SERVER")); assertNull(myFS.findFileByIoFile(new File("\\\\some-unc-server"))); assertNull(myFS.findFileByPath("\\\\wsl$")); assertNull(myFS.findFileByPath("\\\\?\\C:\\")); root = myFS.findFileByPath("\\\\some-unc-server\\some-unc-share"); assertNotNull(root); root2 = myFS.findFileByPath("//SOME-UNC-SERVER/SOME-UNC-SHARE"); assertSame(String.valueOf(root), root, root2); assertEquals("\\\\some-unc-server\\some-unc-share", root.getPresentableName()); RefreshQueue.getInstance().processEvents(false, List.of(new VFileDeleteEvent(this, root))); } else if (SystemInfo.isUnix) { VirtualFile root = myFS.findFileByPath("/"); assertNotNull(root); assertEquals("/", root.getPath()); } VirtualFile root = myFS.findFileByPath(""); assertNotNull(root); File jarFile = createTestJar(tempDir.newFile("test.jar")); assertNotNull(myFS.refreshAndFindFileByIoFile(jarFile)); root = VirtualFileManager.getInstance().findFileByUrl("jar://" + jarFile.getPath() + "!/"); assertNotNull(root); VirtualFile root2 = VirtualFileManager.getInstance().findFileByUrl("jar://" + jarFile.getPath().replace(File.separator, "//") + "!/"); assertEquals(String.valueOf(root2), root, root2); if (!SystemInfo.isFileSystemCaseSensitive) { root2 = VirtualFileManager.getInstance().findFileByUrl("jar://" + jarFile.getPath().toUpperCase(Locale.US) + "!/"); assertEquals(String.valueOf(root2), root, root2); } }