void () { File topDir = tempDir.newDirectory("top"); File subDir1 = createTestDir(topDir, "sub1"); File link = createSymLink(subDir1.getPath(), tempDir.getRoot() + "/link"); VirtualFile vLink = refreshAndFind(link); assertNotNull(link.getPath(), vLink); File subDir2 = createTestDir(topDir, "sub2"); File subChild = createTestFile(subDir2, "subChild.txt"); VirtualFile vSubChild = refreshAndFind(subChild); assertNotNull(subChild.getPath(), vSubChild); String relPath = "../" + subDir2.getName() + "/" + subChild.getName(); VirtualFile vSubChildRel = vLink.findFileByRelativePath(relPath); assertEquals(vSubChild, vSubChildRel); vSubChildRel = LocalFileSystem.getInstance().findFileByPath(vLink.getPath() + "/" + relPath); assertEquals(vSubChild, vSubChildRel); }