/libcore/ojluni/src/test/java/nio/file/ |
D | TestUtil.java | 37 Path dir = FileSystems.getDefault().getPath(where); in createTemporaryDirectory() local 38 return Files.createTempDirectory(dir, "name"); in createTemporaryDirectory() 45 static public void removeAll(Path dir) throws IOException { in removeAll() argument 46 Files.walkFileTree(dir, new FileVisitor<Path>() { in removeAll() 48 public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) { in removeAll() 61 public FileVisitResult postVisitDirectory(Path dir, IOException exc) { in removeAll() 63 Files.delete(dir); in removeAll() 65 System.err.format("Unable to delete %s: %s\n", dir, x); in removeAll() 90 static public Path createDirectoryWithLongPath(Path dir) in createDirectoryWithLongPath() argument 99 dir = dir.resolve(name).resolve("."); in createDirectoryWithLongPath() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | FileTest.java | 41 private static void deleteTempFolder(File dir) { in deleteTempFolder() argument 42 String files[] = dir.list(); in deleteTempFolder() 45 File f = new File(dir, files[i]); in deleteTempFolder() 53 dir.delete(); in deleteTempFolder() 363 File dir = new File(base, String.valueOf(numDir)); in test_createNewFile() local 368 if (dir.exists()) { in test_createNewFile() 370 dir = new File(base, String.valueOf(numDir)); in test_createNewFile() 380 File f1 = new File(dir, "tempfile.tst"); in test_createNewFile() 387 dir.mkdir(); in test_createNewFile() 389 File f1 = new File(dir, "tempfile.tst"); in test_createNewFile() [all …]
|
/libcore/ojluni/src/test/java/nio/file/attribute/ |
D | BasicFileAttributeViewTest.java | 50 static void checkAttributesOfDirectory(Path dir) in checkAttributesOfDirectory() argument 53 BasicFileAttributes attrs = Files.readAttributes(dir, BasicFileAttributes.class); in checkAttributesOfDirectory() 60 File f = new File(dir.toString()); in checkAttributesOfDirectory() 65 static void checkAttributesOfFile(Path dir, Path file) in checkAttributesOfFile() argument 84 BasicFileAttributes dirAttrs = Files.readAttributes(dir, BasicFileAttributes.class); in checkAttributesOfFile() 107 static void attributeReadWriteTests(Path dir) in attributeReadWriteTests() argument 111 Path file = dir.resolve("foo"); in attributeReadWriteTests() 117 checkAttributesOfDirectory(dir); in attributeReadWriteTests() 118 checkAttributesOfFile(dir, file); in attributeReadWriteTests() 121 Path link = dir.resolve("link"); in attributeReadWriteTests() [all …]
|
D | PosixFileAttributeViewTest.java | 131 static void permissionTests(Path dir) in permissionTests() argument 137 Path file = dir.resolve("foo"); in permissionTests() 179 if (TestUtil.supportsLinks(dir)) { in permissionTests() 180 Path link = dir.resolve("link"); in permissionTests() 203 static void createTests(Path dir) in createTests() argument 208 Path file = dir.resolve("foo"); in createTests() 239 static void ownerTests(Path dir) in ownerTests() argument 244 Path file = dir.resolve("gus"); in ownerTests() 275 static void lookupPrincipalTests(Path dir) in lookupPrincipalTests() argument 280 UserPrincipalLookupService lookupService = dir.getFileSystem() in lookupPrincipalTests() [all …]
|
D | BasicFileAttributeViewCreationTimeTest.java | 127 Path dir = TestUtil.createTemporaryDirectory(); in main() local 129 test(dir); in main() 131 TestUtil.removeAll(dir); in main()
|
/libcore/ojluni/src/main/java/java/nio/file/ |
D | TempFileHelper.java | 57 private static Path generatePath(String prefix, String suffix, Path dir) { in generatePath() argument 60 Path name = dir.getFileSystem().getPath(prefix + Long.toString(n) + suffix); in generatePath() 64 return dir.resolve(name); in generatePath() 80 private static Path create(Path dir, in create() argument 91 if (dir == null) in create() 92 dir = tmpdir; in create() 96 if (isPosix && (dir.getFileSystem() == FileSystems.getDefault())) { in create() 127 f = generatePath(prefix, suffix, dir); in create() 142 if (dir == tmpdir && sm != null) in create() 155 static Path createTempFile(Path dir, in createTempFile() argument [all …]
|
D | SimpleFileVisitor.java | 57 public FileVisitResult preVisitDirectory(T dir, BasicFileAttributes attrs) in preVisitDirectory() argument 60 Objects.requireNonNull(dir); in preVisitDirectory() 104 public FileVisitResult postVisitDirectory(T dir, IOException exc) in postVisitDirectory() argument 107 Objects.requireNonNull(dir); in postVisitDirectory()
|
D | Files.java | 454 public static DirectoryStream<Path> newDirectoryStream(Path dir) 457 return provider(dir).newDirectoryStream(dir, AcceptAllFilter.FILTER); 509 public static DirectoryStream<Path> newDirectoryStream(Path dir, String glob) 514 return newDirectoryStream(dir); 517 FileSystem fs = dir.getFileSystem(); 525 return fs.provider().newDirectoryStream(dir, filter); 585 public static DirectoryStream<Path> newDirectoryStream(Path dir, 589 return provider(dir).newDirectoryStream(dir, filter); 671 public static Path createDirectory(Path dir, FileAttribute<?>... attrs) 674 provider(dir).createDirectory(dir, attrs); [all …]
|
D | DirectoryNotEmptyException.java | 46 public DirectoryNotEmptyException(String dir) { in DirectoryNotEmptyException() argument 47 super(dir); in DirectoryNotEmptyException()
|
D | FileTreeWalker.java | 68 private final Path dir; field in FileTreeWalker.DirectoryNode 74 DirectoryNode(Path dir, Object key, DirectoryStream<Path> stream) { in DirectoryNode() argument 75 this.dir = dir; in DirectoryNode() 82 return dir; in directory() 236 private boolean wouldLoop(Path dir, Object key) { in wouldLoop() argument 248 if (Files.isSameFile(dir, ancestor.directory())) { in wouldLoop()
|
D | FileVisitor.java | 119 FileVisitResult preVisitDirectory(T dir, BasicFileAttributes attrs) in preVisitDirectory() argument 175 FileVisitResult postVisitDirectory(T dir, IOException exc) in postVisitDirectory() argument
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | OldFileTest.java | 49 private void deleteTempFolder(File dir) { in deleteTempFolder() argument 50 String files[] = dir.list(); in deleteTempFolder() 52 File f = new File(dir, files[i]); in deleteTempFolder() 59 dir.delete(); in deleteTempFolder() 138 File dir = new File(base, platformId); in test_renameToLjava_io_File() local 139 dir.mkdir(); in test_renameToLjava_io_File() 140 File f = new File(dir, "xxx.xxx"); in test_renameToLjava_io_File() 150 File dir = new File(""); // current directory in test_toURL3() local 151 String newDirURL = dir.toURL().toString(); in test_toURL3() 157 File dir = new File(cts + "/hello"); in test_deleteOnExit() local [all …]
|
D | OldFileWriterTest.java | 40 File dir = new File(System.getProperty("java.io.tmpdir")); in test_ConstructorLjava_io_File_IOException() local 43 fw = new FileWriter(dir); in test_ConstructorLjava_io_File_IOException() 51 File dir = new File(System.getProperty("java.io.tmpdir")); in test_ConstructorLjava_io_FileZ_IOException() local 54 fw = new FileWriter(dir, true); in test_ConstructorLjava_io_FileZ_IOException()
|
/libcore/ojluni/src/main/java/java/util/prefs/ |
D | FileSystemPreferences.java | 256 private final File dir; field in FileSystemPreferences 466 dir = (user ? userRootDir: systemRootDir); in FileSystemPreferences() 467 prefsFile = new File(dir, "prefs.xml"); in FileSystemPreferences() 468 tmpFile = new File(dir, "prefs.tmp"); in FileSystemPreferences() 476 this.dir = new File(path); in FileSystemPreferences() 477 prefsFile = new File(dir, "prefs.xml"); in FileSystemPreferences() 478 tmpFile = new File(dir, "prefs.tmp"); in FileSystemPreferences() 479 newNode = !dir.exists(); in FileSystemPreferences() 504 dir = new File(parent.dir, dirName(name)); in FileSystemPreferences() 505 prefsFile = new File(dir, "prefs.xml"); in FileSystemPreferences() [all …]
|
/libcore/ojluni/src/main/java/sun/nio/fs/ |
D | UnixDirectoryStream.java | 46 private final UnixPath dir; field in UnixDirectoryStream 70 UnixDirectoryStream(UnixPath dir, long dp, DirectoryStream.Filter<? super Path> filter) { in UnixDirectoryStream() argument 71 this.dir = dir; in UnixDirectoryStream() 80 return dir; in directory() 183 IOException ioe = x.asIOException(dir); in readNextEntry() 197 Path entry = dir.resolve(nameAsBytes); in readNextEntry()
|
D | LinuxFileStore.java | 85 byte[] dir = path.asByteArray(); in findMountEntry() 87 if (Arrays.equals(dir, entry.dir())) in findMountEntry() 143 UnixPath dir = new UnixPath(file().getFileSystem(), entry().dir()); in supportsFileAttributeView() local 144 xattrEnabled = isExtendedAttributesEnabled(dir); in supportsFileAttributeView()
|
D | LinuxWatchService.java | 87 WatchKey register(Path dir, in register() argument 93 return poller.register(dir, events, modifiers); in register() 111 LinuxWatchKey(UnixPath dir, LinuxWatchService watcher, int ifd, int wd) { in LinuxWatchKey() argument 112 super(dir, watcher); in LinuxWatchKey() 221 UnixPath dir = (UnixPath)obj; in implRegister() local 253 attrs = UnixFileAttributes.get(dir, true); in implRegister() 255 return x.asIOException(dir); in implRegister() 258 return new NotDirectoryException(dir.getPathForExceptionMessage()); in implRegister() 265 NativeBuffers.asNativeBuffer(dir.getByteArrayForSysCalls()); in implRegister() 275 return x.asIOException(dir); in implRegister() [all …]
|
D | UnixFileSystemProvider.java | 62 abstract UnixFileSystem newFileSystem(String dir); in newFileSystem() argument 382 UnixPath dir = UnixPath.toUnixPath(obj); in createDirectory() local 383 dir.checkWrite(); in createDirectory() 387 mkdir(dir, mode); in createDirectory() 390 throw new FileAlreadyExistsException(dir.toString()); in createDirectory() 391 x.rethrowAsIOException(dir); in createDirectory() 400 UnixPath dir = UnixPath.toUnixPath(obj); in newDirectoryStream() local 401 dir.checkRead(); in newDirectoryStream() 409 long ptr = opendir(dir); in newDirectoryStream() 410 return new UnixDirectoryStream(dir, ptr, filter); in newDirectoryStream() [all …]
|
D | UnixMountEntry.java | 34 private byte[] dir; // directory (mount point) field in UnixMountEntry 55 byte[] dir() { in dir() method in UnixMountEntry 56 return dir; in dir()
|
D | AbstractWatchKey.java | 57 private final Path dir; field in AbstractWatchKey 69 protected AbstractWatchKey(Path dir, AbstractWatchService watcher) { in AbstractWatchKey() argument 71 this.dir = dir; in AbstractWatchKey() 86 return dir; in watchable()
|
D | UnixFileStore.java | 69 this.file = new UnixPath(fs, entry.dir()); in UnixFileStore() 189 Arrays.equals(this.entry.dir(), other.entry.dir()) && in equals() 195 return (int)(dev ^ (dev >>> 32)) ^ Arrays.hashCode(entry.dir()); in hashCode() 200 StringBuilder sb = new StringBuilder(Util.toString(entry.dir())); in toString()
|
/libcore/ojluni/src/main/java/sun/misc/ |
D | MetaIndex.java | 152 public static synchronized void registerDirectory(File dir) { in registerDirectory() argument 162 File indexFile = new File(dir, "meta-index"); in registerDirectory() 173 dir = dir.getCanonicalFile(); in registerDirectory() 190 map.put(new File(dir, curJarName), in registerDirectory() 215 map.put(new File(dir, curJarName), in registerDirectory()
|
/libcore/luni/src/test/java/libcore/dalvik/system/ |
D | ClassLoaderTestSupport.java | 56 private static void cleanUpDir(File dir) { in cleanUpDir() argument 57 if (dir == null || !dir.isDirectory()) { in cleanUpDir() 61 File[] files = dir.listFiles(); in cleanUpDir() 69 assertTrue(dir.delete()); in cleanUpDir()
|
/libcore/ojluni/src/main/java/java/io/ |
D | UnixFileSystem.java | 157 String dir = null; in canonicalize() local 163 dir = parentOrNull(path); in canonicalize() 164 if (dir != null) { in canonicalize() 165 resDir = javaHomePrefixCache.get(dir); in canonicalize() 168 String filename = path.substring(1 + dir.length()); in canonicalize() 170 cache.put(dir + slash + filename, res); in canonicalize() 182 dir != null && dir.startsWith(javaHome)) { in canonicalize() 188 if (resDir != null && resDir.equals(dir)) { in canonicalize() 191 javaHomePrefixCache.put(dir, resDir); in canonicalize()
|
/libcore/metrictests/memory/apps/src/libcore/heapdumper/ |
D | AbstractMetricInstrumentation.java | 106 File dir = Environment.getExternalStoragePublicDirectory(relativeDirectoryName); in resolveOutputDirectory() local 107 if (!dir.isDirectory()) { in resolveOutputDirectory() 110 + dir.getAbsolutePath()); in resolveOutputDirectory() 112 return dir; in resolveOutputDirectory()
|