/libcore/ojluni/src/main/java/java/nio/file/ |
D | Path.java | 98 public interface Path interface 99 extends Comparable<Path>, Iterable<Path>, Watchable 125 Path getRoot(); in getRoot() 135 Path getFileName(); in getFileName() 160 Path getParent(); in getParent() 188 Path getName(int index); in getName() 215 Path subpath(int beginIndex, int endIndex); in subpath() 240 boolean startsWith(Path other); in startsWith() 285 boolean endsWith(Path other); in endsWith() 333 Path normalize(); in normalize() [all …]
|
D | Files.java | 96 private static FileSystemProvider provider(Path path) { in provider() 149 public static InputStream newInputStream(Path path, OpenOption... options) 213 public static OutputStream newOutputStream(Path path, OpenOption... options) 356 public static SeekableByteChannel newByteChannel(Path path, 402 public static SeekableByteChannel newByteChannel(Path path, OpenOption... options) 413 implements DirectoryStream.Filter<Path> 418 public boolean accept(Path entry) { return true; } 454 public static DirectoryStream<Path> newDirectoryStream(Path dir) 509 public static DirectoryStream<Path> newDirectoryStream(Path dir, String glob) 519 DirectoryStream.Filter<Path> filter = new DirectoryStream.Filter<Path>() { [all …]
|
D | FileTreeWalker.java | 68 private final Path dir; 70 private final DirectoryStream<Path> stream; 71 private final Iterator<Path> iterator; 74 DirectoryNode(Path dir, Object key, DirectoryStream<Path> stream) { in DirectoryNode() 81 Path directory() { in directory() 89 DirectoryStream<Path> stream() { in stream() 93 Iterator<Path> iterator() { in iterator() 129 private final Path file; 133 private Event(EventType type, Path file, BasicFileAttributes attrs, IOException ioe) { in Event() 140 Event(EventType type, Path file, BasicFileAttributes attrs) { in Event() [all …]
|
D | TempFileHelper.java | 49 private static final Path tmpdir = 57 private static Path generatePath(String prefix, String suffix, Path dir) { in generatePath() 60 Path name = dir.getFileSystem().getPath(prefix + Long.toString(n) + suffix); in generatePath() 80 private static Path create(Path dir, in create() 125 Path f; in create() 155 static Path createTempFile(Path dir, in createTempFile() 168 static Path createTempDirectory(Path dir, in createTempDirectory()
|
/libcore/ojluni/src/main/java/java/nio/file/spi/ |
D | FileSystemProvider.java | 302 public abstract Path getPath(URI uri); in getPath() 339 public FileSystem newFileSystem(Path path, Map<String,?> env) in newFileSystem() 373 public InputStream newInputStream(Path path, OpenOption... options) in newInputStream() 418 public OutputStream newOutputStream(Path path, OpenOption... options) in newOutputStream() 471 public FileChannel newFileChannel(Path path, in newFileChannel() 519 public AsynchronousFileChannel newAsynchronousFileChannel(Path path, in newAsynchronousFileChannel() 565 public abstract SeekableByteChannel newByteChannel(Path path, in newByteChannel() 592 public abstract DirectoryStream<Path> newDirectoryStream(Path dir, in newDirectoryStream() 593 DirectoryStream.Filter<? super Path> filter) throws IOException; in newDirectoryStream() 618 public abstract void createDirectory(Path dir, FileAttribute<?>... attrs) in createDirectory() [all …]
|
/libcore/luni/src/test/filesystems/src/mypackage/ |
D | MockFileSystemProvider.java | 29 import java.nio.file.Path; 50 public FileSystem newFileSystem(Path path, Map<String, ?> env) throws IOException { in newFileSystem() 60 public Path getPath(URI uri) { in getPath() 65 public SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options, in newByteChannel() 71 public DirectoryStream<Path> newDirectoryStream(Path dir, in newDirectoryStream() 72 DirectoryStream.Filter<? super Path> filter) throws IOException { in newDirectoryStream() 77 public void createDirectory(Path dir, FileAttribute<?>[] attrs) throws IOException { in createDirectory() 82 public void delete(Path path) throws IOException { in delete() 87 public void copy(Path source, Path target, CopyOption... options) throws IOException { in copy() 92 public void move(Path source, Path target, CopyOption... options) throws IOException { in move() [all …]
|
D | MockFileSystem.java | 23 import java.nio.file.Path; 34 private Path path; 41 public MockFileSystem(Path path, Map<String, ?> env) { in MockFileSystem() 50 public Path getPath() { in getPath() 84 public Iterable<Path> getRootDirectories() { in getRootDirectories() 99 public Path getPath(String first, String... more) { in getPath()
|
/libcore/ojluni/src/test/java/nio/file/ |
D | TestUtil.java | 36 static public Path createTemporaryDirectory(String where) throws IOException { in createTemporaryDirectory() 37 Path dir = FileSystems.getDefault().getPath(where); in createTemporaryDirectory() 41 static public Path createTemporaryDirectory() throws IOException { in createTemporaryDirectory() 45 static public void removeAll(Path dir) throws IOException { in removeAll() 46 Files.walkFileTree(dir, new FileVisitor<Path>() { in removeAll() 48 public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) { in removeAll() 52 public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) { in removeAll() 61 public FileVisitResult postVisitDirectory(Path dir, IOException exc) { in removeAll() 70 public FileVisitResult visitFileFailed(Path file, IOException exc) { in removeAll() 77 static public void deleteUnchecked(Path file) { in deleteUnchecked() [all …]
|
/libcore/luni/src/test/java/libcore/java/nio/file/ |
D | SimpleFileVisitorTest.java | 23 import java.nio.file.Path; 32 Path stubPath = mock(Path.class); in test_preVisitDirectory() 34 SimpleFileVisitor<Path> fileVisitor = new TestSimpleFileVisitor(); in test_preVisitDirectory() 51 Path stubPath = mock(Path.class); in test_postVisitDirectory() 53 SimpleFileVisitor<Path> fileVisitor = new TestSimpleFileVisitor(); in test_postVisitDirectory() 71 Path stubPath = mock(Path.class); in test_visitFile() 73 SimpleFileVisitor<Path> fileVisitor = new TestSimpleFileVisitor(); in test_visitFile() 89 Path stubPath = mock(Path.class); in test_visitFileFailed() 91 SimpleFileVisitor<Path> fileVisitor = new TestSimpleFileVisitor(); in test_visitFileFailed() 118 private static class TestSimpleFileVisitor extends SimpleFileVisitor<Path> {
|
D | DefaultSecureDirectoryStreamTest.java | 37 import java.nio.file.Path; 58 Path path_root; 59 Path path_dir1; 60 Path path_dir2; 61 Path path_dir3; 62 Path path_f1; 63 Path path_f2; 64 Path path_f3; 65 Path path_dir4; 98 HashSet<Path> pathsSet = new HashSet<>(); in testIterator() [all …]
|
D | FilesTest.java | 40 import java.nio.file.Path; 69 private Path mockPath; 71 private Path mockPath2; 129 Path unicodeFilePath = filesSetup.getPathInTestDir("परीक्षण फ़ाइल"); in test_createFile() 158 Path filePath2 = filesSetup.getPathInTestDir("new_file"); in test_createFile$String$Attr() 181 Path dirPath = filesSetup.getPathInTestDir("dir1/dir2/dir3"); in test_createDirectories() 199 public void test_createDirectories$Path$Attr() throws IOException { in test_createDirectories$Path$Attr() 200 Path dirPath = filesSetup.getPathInTestDir("dir1/dir2/dir3"); in test_createDirectories$Path$Attr() 216 Path dirPath2 = filesSetup.getPathInTestDir("dir1/dir2/dir4"); in test_createDirectories$Path$Attr() 223 public void test_createDirectories$Path$Attr_NPE() throws IOException { in test_createDirectories$Path$Attr_NPE() [all …]
|
D | LinuxPathTest.java | 37 import java.nio.file.Path; 65 private static final Path fakePath = Paths.get("fakePath"); 76 Path absolutePath = fakePath.toAbsolutePath(); in test_isAbsolute() 167 public void test_startsWith$Path() { in test_startsWith$Path() 176 filesSetup.getTestPath().startsWith((Path) null); in test_startsWith$Path_NPE() 180 public void test_endsWith$Path() { in test_endsWith$Path() 190 filesSetup.getTestPath().endsWith((Path)null); in test_endsWith$Path_NPE() 218 public void test_resolve$Path() { in test_resolve$Path() 219 Path p = Paths.get("p"); in test_resolve$Path() 220 Path p1 = Paths.get("p1"); in test_resolve$Path() [all …]
|
D | Files2Test.java | 50 import java.nio.file.Path; 102 private Path mockPath; 104 private Path mockPath2; 304 Path dirPath = filesSetup.getPathInTestDir(dirName); in test_isDirectory() 325 Path dirPath = filesSetup.getPathInTestDir("dir"); in test_isRegularFile() 345 Path deviceFilePath = Paths.get("/dev/null"); in test_isRegularFile() 583 public void test_walkFileTree$Path$Set$int$FileVisitor_symbolicLinkFollow() in test_walkFileTree$Path$Set$int$FileVisitor_symbolicLinkFollow() 595 Path rootDir = filesSetup.getPathInTestDir("root"); in test_walkFileTree$Path$Set$int$FileVisitor_symbolicLinkFollow() 596 Path dir1 = filesSetup.getPathInTestDir("root/dir1"); in test_walkFileTree$Path$Set$int$FileVisitor_symbolicLinkFollow() 597 Path dir2 = filesSetup.getPathInTestDir("root/dir1/dir2"); in test_walkFileTree$Path$Set$int$FileVisitor_symbolicLinkFollow() [all …]
|
D | FilesSetup.java | 34 import java.nio.file.Path; 57 private Path dataFilePath; 59 private Path testPath; 61 private Path testDirPath; 90 Path getTestPath() { in getTestPath() 95 Path getDataFilePath() { in getDataFilePath() 100 Path getTestDirPath() { in getTestDirPath() 117 Path root = Paths.get(testDir); in clearAll() 126 private static void delete(Path path) throws IOException { in delete() 128 DirectoryStream<Path> dirStream = Files.newDirectoryStream(path); in delete() [all …]
|
D | WatchServiceTest.java | 25 import java.nio.file.Path; 58 final WatchEvent.Kind<Path> expectedKind; 62 public WatchEventResult(WatchEvent.Kind<Path> expectedKind) { in WatchEventResult() 68 public WatchEventResult(WatchEvent.Kind<Path> expectedKind, in WatchEventResult() 124 Path file = Paths.get(filesSetup.getTestDir(), "directory/file"); in test_singleFile() 125 Path directory = Paths.get(filesSetup.getTestDir(), "directory"); in test_singleFile() 168 Path file = Paths.get(filesSetup.getTestDir(), "directory/file"); in test_EventMask() 169 Path directory = Paths.get(filesSetup.getTestDir(), "directory"); in test_EventMask() 190 Path dirInDir = Paths.get(filesSetup.getTestDir(), "directory/dir"); in test_singleDirectory() 191 Path directory = Paths.get(filesSetup.getTestDir(), "directory"); in test_singleDirectory() [all …]
|
D | DefaultFileSystemProviderTest.java | 38 import java.nio.file.Path; 402 Path newDirectory = filesSetup.getPathInTestDir("newDir"); in test_createDirectory() 419 Path unicodeFilePath = filesSetup.getPathInTestDir("टेस्ट डायरेक्टरी"); in test_createDirectory() 434 Path dirPath2 = filesSetup.getPathInTestDir("new_file"); in test_createDirectory$String$FileAttr() 501 public void test_createSymbolicLink$Path$Attr() throws IOException { in test_createSymbolicLink$Path$Attr() 513 public void test_createSymbolicLink$Path$Attr_NPE() throws IOException { in test_createSymbolicLink$Path$Attr_NPE() 551 Path dirPath = filesSetup.getPathInTestDir("dir"); in test_delete() 584 Path dirPath = filesSetup.getPathInTestDir("dir"); in test_deleteIfExist() 633 Path symlink = filesSetup.getPathInTestDir("symlink"); in test_copy() 634 Path newFile = filesSetup.getPathInTestDir("newDir"); in test_copy() [all …]
|
/libcore/ojluni/src/main/java/sun/nio/fs/ |
D | UnixDirectoryStream.java | 43 implements DirectoryStream<Path> 52 private final DirectoryStream.Filter<? super Path> filter; 62 private Iterator<Path> iterator; 70 UnixDirectoryStream(UnixPath dir, long dp, DirectoryStream.Filter<? super Path> filter) { in UnixDirectoryStream() 124 protected final Iterator<Path> iterator(DirectoryStream<Path> ds) { in iterator() 137 public Iterator<Path> iterator() { in iterator() 144 private class UnixDirectoryIterator implements Iterator<Path> { 145 private final DirectoryStream<Path> stream; 151 private Path nextEntry; 153 UnixDirectoryIterator(DirectoryStream<Path> stream) { in UnixDirectoryIterator() [all …]
|
D | AbstractPath.java | 38 abstract class AbstractPath implements Path { 52 public final Path resolve(String other) { in resolve() 57 public final Path resolveSibling(Path other) { in resolveSibling() 60 Path parent = getParent(); in resolveSibling() 65 public final Path resolveSibling(String other) { in resolveSibling() 70 public final Iterator<Path> iterator() { in iterator() 71 return new Iterator<Path>() { in iterator() 78 public Path next() { in iterator() 80 Path result = getName(i); in iterator()
|
D | UnixFileSystemProvider.java | 97 public Path getPath(URI uri) { in getPath() 101 UnixPath checkPath(Path obj) { in checkPath() 111 public <V extends FileAttributeView> V getFileAttributeView(Path obj, in getFileAttributeView() 130 public <A extends BasicFileAttributes> A readAttributes(Path file, in readAttributes() 148 protected DynamicFileAttributeView getFileAttributeView(Path obj, in getFileAttributeView() 166 public FileChannel newFileChannel(Path obj, in newFileChannel() 183 public AsynchronousFileChannel newAsynchronousFileChannel(Path obj, in newAsynchronousFileChannel() 203 public SeekableByteChannel newByteChannel(Path obj, in newByteChannel() 220 boolean implDelete(Path obj, boolean failIfNotExists) throws IOException { in implDelete() 250 public void copy(Path source, Path target, CopyOption... options) in copy() [all …]
|
D | AbstractFileSystemProvider.java | 62 abstract DynamicFileAttributeView getFileAttributeView(Path file, in getFileAttributeView() 67 public final void setAttribute(Path file, in setAttribute() 83 …public final Map<String,Object> readAttributes(Path file, String attributes, LinkOption... options) in readAttributes() 99 abstract boolean implDelete(Path file, boolean failIfNotExists) throws IOException; in implDelete() 102 public final void delete(Path file) throws IOException { in delete() 107 public final boolean deleteIfExists(Path file) throws IOException { in deleteIfExists()
|
D | PollingWatchService.java | 71 WatchKey register(final Path path, in register() 141 private PollingWatchKey doPrivilegedRegister(Path path, 244 private Map<Path,CacheEntry> entries; 246 PollingWatchKey(Path dir, PollingWatchService watcher, Object fileKey) 253 this.entries = new HashMap<Path,CacheEntry>(); 256 try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir)) { 257 for (Path entry: stream) { 324 DirectoryStream<Path> stream = null; 336 for (Path entry: stream) { 396 Iterator<Map.Entry<Path,CacheEntry>> i = entries.entrySet().iterator(); [all …]
|
/libcore/tools/upstream/src/main/java/libcore/ |
D | CopyUpstreamFiles.java | 22 import java.nio.file.Path; 30 private final Path outputDir; 32 private CopyUpstreamFiles(StandardRepositories standardRepositories, Path outputDir) { in CopyUpstreamFiles() 38 List<Path> relPaths = standardRepositories.ojluni().loadRelPathsFromBlueprint(); in run() 47 for (Path relPath : relPaths) { in run() 50 Path upstreamFile = upstream.absolutePath(relPath); in run() 52 Path outputFile = outputDir in run() 64 private void copyFile(Path from, Path to) throws IOException { in copyFile() 68 Path toDir = to.getParent(); in copyFile() 82 Path outputDir = new File(args[0]).toPath(); in main()
|
/libcore/ojluni/annotations/hiddenapi/java/nio/file/ |
D | FileTreeWalker.java | 36 java.nio.file.Path file, boolean canUseCached) throws java.io.IOException { in getAttributes() 40 private boolean wouldLoop(java.nio.file.Path dir, java.lang.Object key) { in wouldLoop() 45 java.nio.file.Path entry, boolean ignoreSecurityException, boolean canUseCached) { in visit() 49 java.nio.file.FileTreeWalker.Event walk(java.nio.file.Path file) { in walk() 104 java.nio.file.Path dir, in DirectoryNode() 106 java.nio.file.DirectoryStream<java.nio.file.Path> stream) { in DirectoryNode() 110 java.nio.file.Path directory() { in directory() 118 java.nio.file.DirectoryStream<java.nio.file.Path> stream() { in stream() 122 java.util.Iterator<java.nio.file.Path> iterator() { in iterator() 134 private final java.nio.file.Path dir; [all …]
|
/libcore/ojluni/src/test/java/nio/file/attribute/ |
D | BasicFileAttributeViewTest.java | 50 static void checkAttributesOfDirectory(Path dir) in checkAttributesOfDirectory() 65 static void checkAttributesOfFile(Path dir, Path file) in checkAttributesOfFile() 96 static void checkAttributesOfLink(Path link) in checkAttributesOfLink() 107 static void attributeReadWriteTests(Path dir) in attributeReadWriteTests() 111 Path file = dir.resolve("foo"); in attributeReadWriteTests() 121 Path link = dir.resolve("link"); in attributeReadWriteTests() 136 Path dir = TestUtil.createTemporaryDirectory(); in main()
|
D | BasicFileAttributeViewCreationTimeTest.java | 37 import java.nio.file.Path; 51 private static FileTime creationTime(Path file) throws IOException { in creationTime() 58 private static void setCreationTime(Path file, FileTime time) throws IOException { in setCreationTime() 64 static void test(Path top) throws IOException { in test() 65 Path file = Files.createFile(top.resolve("foo")); in test() 127 Path dir = TestUtil.createTemporaryDirectory(); in main()
|