void () { File top = tempDir.newDirectory("top"); File sub1 = createTestDir(top, "s1"); File ss1 = createTestDir(sub1, "ss1"); File link1 = createSymLink(sub1.getPath(), ss1.getPath() + "/l1"); File sub2 = createTestDir(top, "s2"); File ss2 = createTestDir(sub2, "ss2"); File link2 = createSymLink(sub1.getPath(), ss2.getPath() + "/l2"); VirtualFile vl1 = refreshAndFind(link1); assertNotNull(link1.getPath(), vl1); VirtualFile vl2 = refreshAndFind(link2); assertNotNull(link2.getPath(), vl2); String path = link2.getPath() +"/"+ss1.getName()+"/"+link1.getName()+ "/" + ss1.getName()+"/"+link1.getName(); VirtualFile f = LocalFileSystem.getInstance().findFileByPath(path); assertNotNull(f); assertEquals(link1.getName(), f.getName()); assertTrue(f.getPath(), f.is(VFileProperty.SYMLINK)); assertTrue(f.getPath(), f.isRecursiveOrCircularSymlink()); f = f.getParent(); assertEquals(ss1.getName(), f.getName()); assertFalse(f.getPath(), f.is(VFileProperty.SYMLINK)); assertFalse(f.getPath(), f.isRecursiveOrCircularSymlink()); f = f.getParent(); assertEquals(link1.getName(), f.getName()); assertTrue(f.getPath(), f.is(VFileProperty.SYMLINK)); assertTrue(f.getPath(), f.isRecursiveOrCircularSymlink()); }