Lines Matching refs:toRealPath
50 // toRealPath method
93 * Exercise toRealPath method
100 * Test: totRealPath() will access same file as toRealPath(NOFOLLOW_LINKS)
102 assertTrue(Files.isSameFile(file.toRealPath(), file.toRealPath(NOFOLLOW_LINKS)));
105 * Test: toRealPath should fail if file does not exist
109 doesNotExist.toRealPath();
114 doesNotExist.toRealPath(NOFOLLOW_LINKS);
120 * Test: toRealPath() should resolve links
124 assertTrue(link.toRealPath().equals(file.toRealPath()));
129 * Test: toRealPath(NOFOLLOW_LINKS) should not resolve links
133 assertTrue(link.toRealPath(NOFOLLOW_LINKS).getFileName().equals(link.getFileName()));
138 * Test: toRealPath(NOFOLLOW_LINKS) with broken link
142 assertTrue(link.toRealPath(NOFOLLOW_LINKS).getFileName().equals(link.getFileName()));
147 * Test: toRealPath should eliminate "."
149 assertTrue(dir.resolve(".").toRealPath().equals(dir.toRealPath()));
150 assertTrue(dir.resolve(".").toRealPath(NOFOLLOW_LINKS).equals(dir.toRealPath(NOFOLLOW_LINKS)));
153 * Test: toRealPath should eliminate ".." when it doesn't follow a
157 assertTrue(subdir.resolve("..").toRealPath().equals(dir.toRealPath()));
158 assertTrue(subdir.resolve("..").toRealPath(NOFOLLOW_LINKS).equals(dir.toRealPath(NOFOLLOW_LINKS)));