/libcore/luni/src/test/java/libcore/java/nio/file/ |
D | Files2Test.java | 45 import java.nio.file.Files; 120 assertEquals(mockPath2, Files.move(mockPath, mockPath2, mockCopyOption)); in test_move() 127 assertEquals(mockPath2, Files.readSymbolicLink(mockPath)); in test_readSymbolicLink() 135 assertTrue(Files.isSameFile(mockPath, mockPath2)); in test_isSameFile() 136 assertFalse(Files.isSameFile(mockPath2, mockPath)); in test_isSameFile() 143 Files.getFileStore(mockPath); in test_getFileStore() 153 assertTrue(Files.isHidden(mockPath)); in test_isHidden() 154 assertFalse(Files.isHidden(mockPath2)); in test_isHidden() 160 Files.probeContentType(filesSetup.getPathInTestDir("file.txt"))); in test_probeContentType() 162 Files.probeContentType(filesSetup.getPathInTestDir("file.java"))); in test_probeContentType() [all …]
|
D | FilesTest.java | 36 import java.nio.file.Files; 90 assertSame(is, Files.newInputStream(mockPath, READ)); in test_newInputStream() 102 assertSame(os, Files.newOutputStream(mockPath, APPEND)); in test_newOutputStream() 116 assertSame(sfc, Files.newByteChannel(mockPath, READ)); in test_newByteChannel() 124 assertFalse(Files.exists(filesSetup.getTestPath())); in test_createFile() 125 Files.createFile(filesSetup.getTestPath()); in test_createFile() 126 assertTrue(Files.exists(filesSetup.getTestPath())); in test_createFile() 130 Files.createFile(unicodeFilePath); in test_createFile() 131 Files.exists(unicodeFilePath); in test_createFile() 135 Files.createFile(filesSetup.getDataFilePath()); in test_createFile() [all …]
|
D | WatchServiceTest.java | 24 import java.nio.file.Files; 126 assertFalse(Files.exists(file)); in test_singleFile() 127 Files.createDirectories(directory); in test_singleFile() 131 Files.createFile(file); in test_singleFile() 137 Files.write(file, "hello1".getBytes()); in test_singleFile() 155 Files.delete(file); in test_singleFile() 170 assertFalse(Files.exists(file)); in test_EventMask() 171 Files.createDirectories(directory); in test_EventMask() 175 Files.createFile(file); in test_EventMask() 177 Files.write(file, "hello1".getBytes()); in test_EventMask() [all …]
|
D | DefaultSecureDirectoryStreamTest.java | 32 import java.nio.file.Files; 86 Files.createDirectory(path_root); in setup() 87 Files.createDirectory(path_dir1); in setup() 88 Files.createDirectory(path_dir2); in setup() 89 Files.createDirectory(path_dir3); in setup() 90 Files.createDirectory(path_dir4); in setup() 91 Files.createFile(path_f1); in setup() 92 Files.createFile(path_f2); in setup() 93 Files.createFile(path_f3); in setup() 106 try (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(path_root, in testIterator() [all …]
|
D | DefaultFileSystemProviderTest.java | 34 import java.nio.file.Files; 403 assertFalse(Files.exists(newDirectory)); in test_createDirectory() 404 assertFalse(Files.isDirectory(newDirectory)); in test_createDirectory() 408 assertTrue(Files.exists(newDirectory)); in test_createDirectory() 409 assertTrue(Files.isDirectory(newDirectory)); in test_createDirectory() 421 assertTrue(Files.exists(unicodeFilePath)); in test_createDirectory() 429 assertEquals(attr.value(), Files.getAttribute(filesSetup.getTestPath(), attr.name())); in test_createDirectory$String$FileAttr() 437 assertEquals(attr1.value(), Files.getAttribute(dirPath2, attr.name())); in test_createDirectory$String$FileAttr() 468 assertTrue(Files.isSymbolicLink(filesSetup.getTestPath())); in test_createSymbolicLink() 477 Files.deleteIfExists(filesSetup.getTestPath()); in test_createSymbolicLink() [all …]
|
D | DefaultFileSystemProvider2Test.java | 34 import java.nio.file.Files; 96 assertFalse(Files.exists(filesSetup.getDataFilePath())); in test_move() 99 Files.createFile(filesSetup.getTestPath()); in test_move() 108 Files.createFile(filesSetup.getTestPath()); in test_move() 124 Files.setAttribute(filesSetup.getDataFilePath(), "basic:lastModifiedTime", fileTime); in test_move_CopyOption() 127 ((FileTime) Files.getAttribute(filesSetup.getTestPath(), in test_move_CopyOption() 169 Files.createDirectory(dirPath); in test_move_directory() 170 Files.createDirectory(nestedDirPath); in test_move_directory() 171 Files.copy(filesSetup.getDataFilePath(), in test_move_directory() 176 try (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(dirPath2)) { in test_move_directory() [all …]
|
D | LinuxPathTest.java | 33 import java.nio.file.Files; 328 Files.createFile(filesSetup.getTestPath()); in test_toRealPath() 330 assertTrue(Files.isSameFile(filesSetup.getTestPath().toAbsolutePath(), realPath)); in test_toRealPath() 332 assertFalse(Files.isSymbolicLink(realPath)); in test_toRealPath() 336 Files.createDirectories(dir); in test_toRealPath() 337 Files.createFile(file); in test_toRealPath() 339 assertTrue(Files.isSameFile(file.toAbsolutePath(), realPath)); in test_toRealPath() 341 assertFalse(Files.isSymbolicLink(realPath)); in test_toRealPath() 345 Files.createSymbolicLink(symLink, filesSetup.getTestPath().toAbsolutePath()); in test_toRealPath() 347 assertTrue(Files.isSameFile(symLink, realPath)); in test_toRealPath() [all …]
|
D | FilesSetup.java | 31 import java.nio.file.Files; 75 testDirPath = Files.createTempDirectory("testDir"); in initializeFiles() 127 if (Files.isDirectory(path)) { in delete() 128 DirectoryStream<Path> dirStream = Files.newDirectoryStream(path); in delete() 141 Files.deleteIfExists(path); in delete() 148 OutputStream os = Files.newOutputStream(file, option); in writeToFile() 154 InputStream is = Files.newInputStream(file); in readFromFile()
|
/libcore/ojluni/src/test/java/nio/file/attribute/ |
D | PosixFileAttributeViewTest.java | 59 Files.setPosixFilePermissions(file, perms); in testPermissions() 60 Set<PosixFilePermission> current = Files.getPosixFilePermissions(file); in testPermissions() 68 Files.setAttribute(file, "posix:permissions", perms); in testPermissions() 69 current = (Set<PosixFilePermission>)Files.getAttribute(file, "posix:permissions"); in testPermissions() 106 Files.createFile(file, attr); in createWithPermissions() 109 Files.getFileAttributeView(file, PosixFileAttributeView.class) in createWithPermissions() 113 Files.delete(file); in createWithPermissions() 117 Files.createDirectory(file, attr); in createWithPermissions() 120 Files.getFileAttributeView(file, PosixFileAttributeView.class) in createWithPermissions() 124 Files.delete(file); in createWithPermissions() [all …]
|
D | BasicFileAttributeViewTest.java | 53 BasicFileAttributes attrs = Files.readAttributes(dir, BasicFileAttributes.class); in checkAttributesOfDirectory() 68 BasicFileAttributes attrs = Files.readAttributes(file, BasicFileAttributes.class); in checkAttributesOfFile() 83 Files.getFileAttributeView(file, BasicFileAttributeView.class); in checkAttributesOfFile() 84 BasicFileAttributes dirAttrs = Files.readAttributes(dir, BasicFileAttributes.class); in checkAttributesOfFile() 100 Files.readAttributes(link, BasicFileAttributes.class, LinkOption.NOFOLLOW_LINKS); in checkAttributesOfLink() 112 try (OutputStream out = Files.newOutputStream(file)) { in attributeReadWriteTests() 123 Files.createSymbolicLink(link, file); in attributeReadWriteTests()
|
D | BasicFileAttributeViewCreationTimeTest.java | 38 import java.nio.file.Files; 52 return Files.readAttributes(file, BasicFileAttributes.class).creationTime(); in creationTime() 60 Files.getFileAttributeView(file, BasicFileAttributeView.class); in setCreationTime() 65 Path file = Files.createFile(top.resolve("foo")); in test() 102 Files.setLastModifiedTime(file, FileTime.from(plusHour)); in test()
|
/libcore/ojluni/src/test/java/nio/file/ |
D | TestUtil.java | 38 return Files.createTempDirectory(dir, "name"); in createTemporaryDirectory() 42 return Files.createTempDirectory("name"); in createTemporaryDirectory() 46 Files.walkFileTree(dir, new FileVisitor<Path>() { in removeAll() 54 Files.delete(file); in removeAll() 63 Files.delete(dir); in removeAll() 79 Files.delete(file); in deleteUnchecked() 100 Files.createDirectory(dir); in createDirectoryWithLongPath() 112 Files.createSymbolicLink(link, target); in supportsLinks() 113 Files.delete(link); in supportsLinks()
|
/libcore/ojluni/src/main/java/java/nio/file/ |
D | CopyMoveHelper.java | 109 BasicFileAttributes attrs = Files.readAttributes(source, in copyToForeignTarget() 117 Files.deleteIfExists(target); in copyToForeignTarget() 118 } else if (Files.exists(target)) in copyToForeignTarget() 123 Files.createDirectory(target); in copyToForeignTarget() 125 try (InputStream in = Files.newInputStream(source)) { in copyToForeignTarget() 126 Files.copy(in, target); in copyToForeignTarget() 133 Files.getFileAttributeView(target, BasicFileAttributeView.class); in copyToForeignTarget() 141 Files.delete(target); in copyToForeignTarget() 158 Files.delete(source); in moveToForeignTarget()
|
D | FileTreeWalker.java | 219 attrs = Files.readAttributes(file, BasicFileAttributes.class, linkOptions); in getAttributes() 225 attrs = Files.readAttributes(file, in getAttributes() 248 if (Files.isSameFile(dir, ancestor.directory())) { in wouldLoop() 300 stream = Files.newDirectoryStream(entry); in visit()
|
D | TempFileHelper.java | 136 return Files.createDirectory(f, attrs); in create() 138 return Files.createFile(f, attrs); in create()
|
/libcore/luni/ |
D | unicode-license.txt | 3 Unicode Data Files include all data files under the directories 23 of the Unicode data files and any associated documentation (the "Data Files") or 25 the Data Files or Software without restriction, including without limitation the 27 the Data Files or Software, and to permit persons to whom the Data Files or 29 and this permission notice appear with all copies of the Data Files or Software, 47 in these Data Files or Software without prior written authorization of the
|
/libcore/support/src/test/java/libcore/testing/io/ |
D | TestIoUtils.java | 22 import java.nio.file.Files; 35 return new String(Files.readAllBytes(Paths.get(absolutePath)), StandardCharsets.UTF_8); in readFileAsString()
|
/libcore/ojluni/src/main/java/sun/net/www/protocol/jar/ |
D | URLJarFile.java | 30 import java.nio.file.Files; 222 Path tmpFile = Files.createTempFile("jar_cache", null); in retrieve() 224 Files.copy(in, tmpFile, StandardCopyOption.REPLACE_EXISTING); in retrieve() 230 Files.delete(tmpFile); in retrieve()
|
/libcore/ojluni/src/main/java/sun/nio/fs/ |
D | PollingWatchService.java | 147 BasicFileAttributes attrs = Files.readAttributes(path, BasicFileAttributes.class); 256 try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir)) { 260 Files.getLastModifiedTime(entry, LinkOption.NOFOLLOW_LINKS).toMillis(); 326 stream = Files.newDirectoryStream(watchable()); 340 Files.getLastModifiedTime(entry, LinkOption.NOFOLLOW_LINKS).toMillis();
|
D | MimeTypesFileTypeDetector.java | 30 import java.nio.file.Files;
|
/libcore/luni/src/test/java/libcore/java/nio/file/attribute/ |
D | AclEntryTest.java | 28 import java.nio.file.Files; 38 UserPrincipal user = Files.getOwner(Paths.get(".")); in testGetters()
|
/libcore/tools/upstream/src/main/java/libcore/ |
D | CopyUpstreamFiles.java | 21 import java.nio.file.Files; 75 Files.copy(from, to); in copyFile()
|
/libcore/ojluni/src/main/java/java/util/stream/ |
D | BaseStream.java | 28 import java.nio.file.Files;
|
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
D | AsynchronousFileChannelTest.java | 33 import java.nio.file.Files; 56 Path tempDir = Files.createTempDirectory("ASFCTest_test_open_create"); in testOpen_create() 69 Path tempDir = Files.createTempDirectory("ASFCTest_test_open_existing"); in testOpen_existing() 95 Path tempDir = Files.createTempDirectory("ASFCTest_test_open_nonexistent"); in testOpen_nonexistent() 660 Files.createTempFile("AFCTest_testCustomExecutor", ""), in testCustomExecutor() 687 Path tempDir = Files.createTempFile("ASFCTest_test_force", ""); in testForce()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | ObjectInputStream2Test.java | 33 import java.nio.file.Files; 232 Files.copy(dexIs, sameFieldNames.toPath(), StandardCopyOption.REPLACE_EXISTING); in test_sameName()
|