/external/jimfs/jimfs/src/test/java/com/google/common/jimfs/ |
D | JimfsPathTest.java | 40 private final PathService pathService = PathServiceTest.fakeUnixPathService(); field in JimfsPathTest 68 assertEquals("C:\\", pathService.parsePath("C:\\").toString()); in testPathParsing_windowsStylePaths() 120 new PathTester(pathService, "/").root("/").test("/"); in testRootPath() 125 new PathTester(pathService, "test").names("test").test("test"); in testRelativePath_singleName() 127 Path path = pathService.parsePath("test"); in testRelativePath_singleName() 133 PathTester tester = new PathTester(pathService, "foo/bar").names("foo", "bar"); in testRelativePath_twoNames() 140 new PathTester(pathService, "foo/bar/baz/test") in testRelativePath_fourNames() 147 new PathTester(pathService, "/foo").root("/").names("foo").test("/foo"); in testAbsolutePath_singleName() 152 new PathTester(pathService, "/foo/bar").root("/").names("foo", "bar").test("/foo/bar"); in testAbsolutePath_twoNames() 157 new PathTester(pathService, "/foo/bar/baz/test") in testAbsoluteMultiNamePath_fourNames() [all …]
|
D | PathServiceTest.java | 126 PathService pathService = fakePathService(PathType.unix(), false); in testHash_usingDisplayForm() local 128 JimfsPath path1 = new JimfsPath(pathService, null, ImmutableList.of(Name.create("FOO", "foo"))); in testHash_usingDisplayForm() 129 JimfsPath path2 = new JimfsPath(pathService, null, ImmutableList.of(Name.create("FOO", "FOO"))); in testHash_usingDisplayForm() 132 pathService, null, ImmutableList.of(Name.create("FOO", "9874238974897189741"))); in testHash_usingDisplayForm() 134 assertThat(pathService.hash(path1)).isEqualTo(pathService.hash(path2)); in testHash_usingDisplayForm() 135 assertThat(pathService.hash(path2)).isEqualTo(pathService.hash(path3)); in testHash_usingDisplayForm() 140 PathService pathService = fakePathService(PathType.unix(), true); in testHash_usingCanonicalForm() local 142 JimfsPath path1 = new JimfsPath(pathService, null, ImmutableList.of(Name.create("foo", "foo"))); in testHash_usingCanonicalForm() 143 JimfsPath path2 = new JimfsPath(pathService, null, ImmutableList.of(Name.create("FOO", "foo"))); in testHash_usingCanonicalForm() 146 pathService, null, ImmutableList.of(Name.create("28937497189478912374897", "foo"))); in testHash_usingCanonicalForm() [all …]
|
D | PathTester.java | 37 private final PathService pathService; field in PathTester 42 public PathTester(PathService pathService, String string) { in PathTester() argument 43 this.pathService = pathService; in PathTester() 62 Path path = pathService.parsePath(first, more); in test() 95 new PathTester(pathService, names.get(i)).names(names.get(i)).test(path.getName(i)); in testNames() 103 new PathTester(pathService, fileName).names(fileName).test(path.getFileName()); in testNames() 117 new PathTester(pathService, parentName) in testParents() 139 new PathTester(pathService, Joiner.on('/').join(startNames)) in testSubpaths() 148 new PathTester(pathService, Joiner.on('/').join(endNames)).names(endNames).test(endSubpath); in testSubpaths()
|
D | FileTreeTest.java | 76 private final PathService pathService = field in FileTreeTest 418 JimfsPath pathObj = pathService.parsePath(path); in lookup() 458 File newFile = SymbolicLink.create(new Random().nextInt(), pathService.parsePath(target)); in createSymbolicLink()
|
/external/jimfs/jimfs/src/main/java/com/google/common/jimfs/ |
D | JimfsPath.java | 56 private final PathService pathService; field in JimfsPath 58 public JimfsPath(PathService pathService, @NullableDecl Name root, Iterable<Name> names) { in JimfsPath() argument 59 this.pathService = checkNotNull(pathService); in JimfsPath() 96 return pathService.getFileSystem(); in getFileSystem() 106 return (JimfsFileSystem) pathService.getFileSystem(); in getJimfsFileSystem() 119 return pathService.createRoot(root); in getRoot() 133 return pathService.createPath(root, names.subList(0, names.size() - 1)); in getParent() 148 return pathService.createFileName(names.get(index)); in getName() 159 return pathService.createRelativePath(names.subList(beginIndex, endIndex)); in subpath() 178 return startsWith(pathService.parsePath(other)); in startsWith() [all …]
|
D | JimfsFileSystem.java | 173 private final PathService pathService; field in JimfsFileSystem 185 PathService pathService, in JimfsFileSystem() argument 191 this.pathService = checkNotNull(pathService); in JimfsFileSystem() 213 return pathService.getSeparator(); in getSeparator() 219 ImmutableSortedSet.Builder<JimfsPath> builder = ImmutableSortedSet.orderedBy(pathService); in getRootDirectories() 221 builder.add(pathService.createRoot(name)); in getRootDirectories() 234 return pathService; in getPathService() 256 return pathService.parsePath(first, more); in getPath() 262 return pathService.toUri(uri, path.toAbsolutePath()); in toUri() 268 return pathService.fromUri(uri); in toPath() [all …]
|
D | JimfsFileSystems.java | 70 PathService pathService = new PathService(config); in newFileSystem() local 73 JimfsFileStore fileStore = createFileStore(config, pathService, state); in newFileSystem() 74 FileSystemView defaultView = createDefaultView(config, fileStore, pathService); in newFileSystem() 78 new JimfsFileSystem(provider, uri, fileStore, pathService, defaultView, watchServiceConfig); in newFileSystem() 80 pathService.setFileSystem(fileSystem); in newFileSystem() 86 Configuration config, PathService pathService, FileSystemState state) { in createFileStore() argument 96 JimfsPath path = pathService.parsePath(root); in createFileStore() 114 Configuration config, JimfsFileStore fileStore, PathService pathService) throws IOException { in createDefaultView() argument 115 JimfsPath workingDirPath = pathService.parsePath(config.workingDirectory); in createDefaultView()
|
D | PollingWatchService.java | 68 private final PathService pathService; field in PollingWatchService 78 PathService pathService, in PollingWatchService() argument 83 this.pathService = checkNotNull(pathService); in PollingWatchService() 219 key.post(new Event<>(ENTRY_CREATE, 1, pathService.createFileName(name))); in postChanges() 229 key.post(new Event<>(ENTRY_DELETE, 1, pathService.createFileName(name))); in postChanges() 241 key.post(new Event<>(ENTRY_MODIFY, 1, pathService.createFileName(name))); in postChanges()
|
D | WatchServiceConfiguration.java | 52 abstract AbstractWatchService newWatchService(FileSystemView view, PathService pathService); in newWatchService() argument 67 AbstractWatchService newWatchService(FileSystemView view, PathService pathService) { in newWatchService() argument 68 return new PollingWatchService(view, pathService, view.state(), interval, timeUnit); in newWatchService()
|
D | FileSystemView.java | 196 JimfsPath path, PathService pathService, Set<? super LinkOption> options) throws IOException { in toRealPath() argument 214 return pathService.createPath(root, reversed); in toRealPath()
|