Home
last modified time | relevance | path

Searched refs:dir (Results 1 – 25 of 66) sorted by relevance

123

/libcore/ojluni/src/test/java/nio/file/
DTestUtil.java37 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/ojluni/src/test/java/nio/file/attribute/
DBasicFileAttributeViewTest.java50 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 …]
DPosixFileAttributeViewTest.java131 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 …]
DBasicFileAttributeViewCreationTimeTest.java127 Path dir = TestUtil.createTemporaryDirectory(); in main() local
129 test(dir); in main()
131 TestUtil.removeAll(dir); in main()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DFileTest.java41 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/main/java/java/nio/file/
DTempFileHelper.java57 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 …]
DSimpleFileVisitor.java57 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()
DFiles.java454 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 …]
DDirectoryNotEmptyException.java46 public DirectoryNotEmptyException(String dir) { in DirectoryNotEmptyException() argument
47 super(dir); in DirectoryNotEmptyException()
DFileTreeWalker.java68 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()
DFileVisitor.java119 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/
DOldFileTest.java49 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 …]
DOldFileWriterTest.java40 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/
DFileSystemPreferences.java256 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/misc/
DMetaIndex.java152 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/ojluni/src/main/java/sun/nio/fs/
DLinuxFileStore.java85 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()
DUnixDirectoryStream.java46 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()
DUnixMountEntry.java34 private byte[] dir; // directory (mount point) field in UnixMountEntry
55 byte[] dir() { in dir() method in UnixMountEntry
56 return dir; in dir()
DUnixFileSystemProvider.java62 abstract UnixFileSystem newFileSystem(String dir); in newFileSystem() argument
379 UnixPath dir = UnixPath.toUnixPath(obj); in createDirectory() local
380 dir.checkWrite(); in createDirectory()
384 mkdir(dir, mode); in createDirectory()
387 throw new FileAlreadyExistsException(dir.toString()); in createDirectory()
388 x.rethrowAsIOException(dir); in createDirectory()
397 UnixPath dir = UnixPath.toUnixPath(obj); in newDirectoryStream() local
398 dir.checkRead(); in newDirectoryStream()
406 long ptr = opendir(dir); in newDirectoryStream()
407 return new UnixDirectoryStream(dir, ptr, filter); in newDirectoryStream()
[all …]
DLinuxWatchService.java93 WatchKey register(Path dir, in register() argument
99 return poller.register(dir, events, modifiers); in register()
117 LinuxWatchKey(UnixPath dir, LinuxWatchService watcher, int ifd, int wd) { in LinuxWatchKey() argument
118 super(dir, watcher); in LinuxWatchKey()
226 UnixPath dir = (UnixPath)obj; in implRegister() local
258 attrs = UnixFileAttributes.get(dir, true); in implRegister()
260 return x.asIOException(dir); in implRegister()
263 return new NotDirectoryException(dir.getPathForExceptionMessage()); in implRegister()
270 NativeBuffers.asNativeBuffer(dir.getByteArrayForSysCalls()); in implRegister()
280 return x.asIOException(dir); in implRegister()
[all …]
DAbstractWatchKey.java57 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()
DUnixFileStore.java69 this.file = new UnixPath(fs, entry.dir()); in UnixFileStore()
189 Arrays.equals(this.entry.dir(), other.entry.dir()); in equals()
194 return (int)(dev ^ (dev >>> 32)) ^ Arrays.hashCode(entry.dir()); in hashCode()
199 StringBuilder sb = new StringBuilder(Util.toString(entry.dir())); in toString()
/libcore/luni/src/test/java/dalvik/system/
DClassLoaderTestSupport.java56 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/
DUnixFileSystem.java151 String dir = null; in canonicalize() local
157 dir = parentOrNull(path); in canonicalize()
158 if (dir != null) { in canonicalize()
159 resDir = javaHomePrefixCache.get(dir); in canonicalize()
162 String filename = path.substring(1 + dir.length()); in canonicalize()
164 cache.put(dir + slash + filename, res); in canonicalize()
173 dir != null && dir.startsWith(javaHome)) { in canonicalize()
179 if (resDir != null && resDir.equals(dir)) { in canonicalize()
182 javaHomePrefixCache.put(dir, resDir); in canonicalize()
/libcore/
DNativeCode.mk36 define include-core-native-dir
50 define include-openjdk-native-dir
69 $(foreach dir, \
71 $(eval $(call include-openjdk-native-dir,$(dir))))
74 $(foreach dir, \
76 $(eval $(call include-core-native-dir,$(dir))))

123