/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | FileTest.java | 20 import java.io.File; 41 private static void deleteTempFolder(File dir) { in deleteTempFolder() 45 File f = new File(dir, files[i]); in deleteTempFolder() 57 if (File.separatorChar == path.charAt(path.length() - 1)) { in addTrailingSlash() 60 return path + File.separator; in addTrailingSlash() 66 private File tempDirectory; 72 …tempDirectory = new File(addTrailingSlash(System.getProperty("java.io.tmpdir")) + "harmony-test-" … in setUp() 87 File f = new File(tempDirectory.getPath(), "input.tst"); in test_ConstructorLjava_io_FileLjava_lang_String0() 93 new File(tempDirectory, null); in test_ConstructorLjava_io_FileLjava_lang_String1() 100 File f = new File((File) null, "input.tst"); in test_ConstructorLjava_io_FileLjava_lang_String2() [all …]
|
D | FileOutputStreamTest.java | 20 import java.io.File; 39 private File f; 73 f = File.createTempFile("FileOutputStreamTest", "tst"); in test_ConstructorLjava_io_File() 81 f = File.createTempFile("FileOutputStreamTest", "tst"); in test_ConstructorLjava_io_FileDescriptor() 96 f = File.createTempFile("FileOutputStreamTest", "tst"); in test_ConstructorLjava_lang_String() 111 f = File.createTempFile("FileOutputStreamTest", "tst"); in test_ConstructorLjava_lang_StringZ() 140 fos = new FileOutputStream(new File("")); in test_ConstructorLjava_lang_String_I() 155 f = File.createTempFile("FileOutputStreamTest", "tst"); in test_close() 171 f = File.createTempFile("FileOutputStreamTest", "tst"); in test_getFD() 183 f = File.createTempFile("FileOutputStreamTest", "tst"); in test_write$B() [all …]
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | FileTest.java | 22 import java.io.File; 40 private static File createTemporaryDirectory() throws Exception { in createTemporaryDirectory() 42 File directory = new File(base, UUID.randomUUID().toString()); in createTemporaryDirectory() 55 private static File createDeepStructure(File base) throws Exception { in createDeepStructure() 61 File f = base; in createDeepStructure() 63 f = new File(f, longString); in createDeepStructure() 72 File base = createTemporaryDirectory(); in test_longPath() 84 File base = createTemporaryDirectory(); in test_longReadlink() 85 File target = createDeepStructure(base); in test_longReadlink() 86 File source = new File(base, "source"); in test_longReadlink() [all …]
|
D | OldFileTest.java | 20 import java.io.File; 36 File tempDir = new File(System.getProperty("java.io.tmpdir")); 39 File f = new File(tempDir, files[i]); 45 new File(tempDir, files[i]).delete(); 49 private void deleteTempFolder(File dir) { in deleteTempFolder() 52 File f = new File(dir, files[i]); in deleteTempFolder() 66 File d = new File(tmpDirName); in test_ConstructorLjava_io_FileLjava_lang_String() 67 File f = new File(d, "input.tst"); in test_ConstructorLjava_io_FileLjava_lang_String() 69 if (!tmpDirName.endsWith(File.separator)) { in test_ConstructorLjava_io_FileLjava_lang_String() 70 tmpDirName += File.separator; in test_ConstructorLjava_io_FileLjava_lang_String() [all …]
|
D | FileInputStreamTest.java | 33 import java.io.File; 108 private File makeFile() throws Exception { in makeFile() 109 File tmp = File.createTempFile("FileOutputStreamTest", "tmp"); in makeFile() 118 File tmp = makeFile(); in testFileDescriptorOwnership() 178 File tmp = makeFile(); in testClose() 220 File file = new File("/dev/zero"); in test_available_on_nonIOCTL_supported_file() 237 File phile = TestIoUtils.createTemporaryDirectory("test_bug_25695227"); in testFdLeakWhenOpeningDirectory() 250 File largeFile = File.createTempFile("FileInputStreamTest_testSkipOnLargeFiles", ""); in testSkipOnLargeFiles() 277 private static void allocateEmptyFile(File file, long fileSize) in allocateEmptyFile() 297 File[] fds = new File("/proc/self/fd").listFiles(); in getOpenFdsForPrefix() [all …]
|
/libcore/ojluni/src/main/java/java/io/ |
D | FileSystem.java | 89 public abstract boolean isAbsolute(File f); in isAbsolute() 95 public abstract String resolve(File f); in resolve() 113 public abstract int getBooleanAttributes(File f); in getBooleanAttributes() 127 public abstract boolean checkAccess(File f, int access); in checkAccess() 133 public abstract boolean setPermission(File f, int access, boolean enable, boolean owneronly); in setPermission() 140 public abstract long getLastModifiedTime(File f); in getLastModifiedTime() 147 public abstract long getLength(File f); in getLength() 165 public abstract boolean delete(File f); in delete() 172 public abstract String[] list(File f); in list() 178 public abstract boolean createDirectory(File f); in createDirectory() [all …]
|
D | UnixFileSystem.java | 130 public boolean isAbsolute(File f) { in isAbsolute() 134 public String resolve(File f) { in resolve() 189 File f = new File(res); in canonicalize() 210 char sep = File.separatorChar; in parentOrNull() 248 public int getBooleanAttributes(File f) { in getBooleanAttributes() 261 public boolean checkAccess(File f, int access) { in checkAccess() 288 public long getLastModifiedTime(File f) { in getLastModifiedTime() 293 private native long getLastModifiedTime0(File f); in getLastModifiedTime0() 296 public long getLength(File f) { in getLength() 305 public boolean setPermission(File f, int access, boolean enable, boolean owneronly) { in setPermission() [all …]
|
D | File.java | 155 public class File class 156 implements Serializable, Comparable<File> 255 private File(String pathname, int prefixLength) { in File() method in File 265 private File(String child, File parent) { in File() method in File 281 public File(String pathname) { in File() method in File 321 public File(String parent, String child) { in File() method in File 361 public File(File parent, String child) { in File() method in File 415 public File(URI uri) { in File() method in File 437 if (File.separatorChar != '/') in File() 438 p = p.replace('/', File.separatorChar); in File() [all …]
|
/libcore/ojluni/annotations/hiddenapi/java/io/ |
D | FileSystem.java | 60 public abstract boolean isAbsolute(java.io.File f); in isAbsolute() 63 public abstract java.lang.String resolve(java.io.File f); in resolve() 69 public abstract int getBooleanAttributes(java.io.File f); in getBooleanAttributes() 72 public abstract boolean checkAccess(java.io.File f, int access); in checkAccess() 76 java.io.File f, int access, boolean enable, boolean owneronly); in setPermission() 79 public abstract long getLastModifiedTime(java.io.File f); in getLastModifiedTime() 82 public abstract long getLength(java.io.File f); in getLength() 89 public abstract boolean delete(java.io.File f); in delete() 92 public abstract java.lang.String[] list(java.io.File f); in list() 95 public abstract boolean createDirectory(java.io.File f); in createDirectory() [all …]
|
D | File.java | 32 public class File implements java.io.Serializable, java.lang.Comparable<java.io.File> { class 34 private File(java.lang.String pathname, int prefixLength) { in File() method in File 38 private File(java.lang.String child, java.io.File parent) { in File() method in File 42 public File(java.lang.String pathname) { in File() method in File 46 public File(java.lang.String parent, java.lang.String child) { in File() method in File 50 public File(java.io.File parent, java.lang.String child) { in File() method in File 54 public File(java.net.URI uri) { in File() method in File 74 public java.io.File getParentFile() { in getParentFile() 90 public java.io.File getAbsoluteFile() { in getAbsoluteFile() 98 public java.io.File getCanonicalFile() throws java.io.IOException { in getCanonicalFile() [all …]
|
/libcore/support/src/test/java/tests/support/resource/ |
D | Support_Resources.java | 20 import java.io.File; 47 File resource = new File(ANDROID_BUILD_TOP + "/libcore/support/src/test/java" + path); in getStream() 62 File resources = createTempFolder(); in getURL() 83 public static File createTempFolder() { in createTempFolder() 85 File folder = null; in createTempFolder() 87 folder = File.createTempFile("hyts_resources", "", null); in createTempFolder() 97 public static File copyFile(File root, String folder, String file) { in copyFile() 98 File f; in copyFile() 100 f = new File(root.toString() + "/" + folder); in copyFile() 109 File dest = new File(f.toString() + "/" + file); in copyFile() [all …]
|
/libcore/luni/src/test/java/libcore/dalvik/system/ |
D | PathClassLoaderTest.java | 22 import java.io.File; 45 File tmp = new File(System.getProperty("java.io.tmpdir")); in testLibraryPathSearchOrder() 46 File systemLibPath = new File(tmp, "systemLibPath"); in testLibraryPathSearchOrder() 47 File applicationLibPath = new File(tmp, "applicationLibPath"); in testLibraryPathSearchOrder() 49 File applicationLib = makeTempFile(applicationLibPath, "libduplicated.so"); in testLibraryPathSearchOrder() 59 private File makeTempFile(File directory, String name) throws IOException { in makeTempFile() 61 File result = new File(directory, name); in makeTempFile() 68 private static File extractResourceJar(String name) throws Exception { in extractResourceJar() 71 File jar = File.createTempFile(name, ".jar"); in extractResourceJar() 81 File jar = extractResourceJar("loading-test"); in testAppUseOfPathClassLoader() [all …]
|
D | ClassLoaderTestSupport.java | 21 import java.io.File; 34 static Map<String, File> setupAndCopyResources(List<String> resources) throws Exception { in setupAndCopyResources() 35 File srcDir = File.createTempFile("src", ""); in setupAndCopyResources() 39 HashMap<String, File> resourcesMap = new HashMap<>(); in setupAndCopyResources() 43 File resourceFile = new File(srcDir, resource); in setupAndCopyResources() 52 static void cleanUpResources(Map<String, File> resources) { in cleanUpResources() 56 private static void cleanUpDir(File dir) { in cleanUpDir() 63 File[] files = dir.listFiles(); in cleanUpDir() 64 for (File file : files) { in cleanUpDir() 79 File destination) throws IOException { in copyResource()
|
D | InMemoryDexClassLoaderTest.java | 20 import java.io.File; 41 private File srcDir; 42 private File dex1; 43 private File dex2; 46 srcDir = File.createTempFile("src", ""); in setUp() 50 dex1 = new File(srcDir, "loading-test.dex"); in setUp() 51 dex2 = new File(srcDir, "loading-test2.dex"); in setUp() 61 private static void cleanUpDir(File dir) { in cleanUpDir() 65 File[] files = dir.listFiles(); in cleanUpDir() 66 for (File file : files) { in cleanUpDir() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/jar/ |
D | OldJarFileTest.java | 19 import java.io.File; 33 private File resources; 42 new JarFile(new File("Wrong.file")); in test_ConstructorLjava_io_File() 48 new JarFile(new File(resources, jarName)); in test_ConstructorLjava_io_File() 59 String fileName = (new File(resources, jarName)).getCanonicalPath(); in test_ConstructorLjava_lang_String() 71 String fileName = (new File(resources, jarName)).getCanonicalPath(); in test_ConstructorLjava_lang_StringZ() 77 new JarFile(new File("Wrong.file"), true); in test_ConstructorLjava_io_FileZ() 83 new JarFile(new File(resources, jarName), false); in test_ConstructorLjava_io_FileZ() 88 new JarFile(new File("Wrong.file"), true, in test_ConstructorLjava_io_FileZI() 95 new JarFile(new File(resources, jarName), false, in test_ConstructorLjava_io_FileZI() [all …]
|
/libcore/support/src/test/java/tests/support/ |
D | Support_GetLocal.java | 22 import java.io.File; 35 static Hashtable<String, File> cache = new Hashtable<String, File>(20); 37 public static File getLocalFile(String url) throws IOException, in getLocalFile() 40 File temp = cache.get(url); in getLocalFile() 43 temp = File.createTempFile("hyts_local", ".tmp", null); in getLocalFile() 58 public static File getExternalLocalFile(String url) throws IOException, in getExternalLocalFile() 60 File temp = cache.get(url); in getExternalLocalFile() 63 temp = File.createTempFile("hyts_local", ".tmp", null); in getExternalLocalFile() 90 public static File createTempFile(String suffix) throws IOException { in createTempFile() 91 return File.createTempFile("hyts_", suffix, null); in createTempFile() [all …]
|
D | Support_DeleteOnExitTest.java | 3 import java.io.File; 12 File file1 = new File(args[0]); in main() 13 File file2 = new File(args[1]); in main()
|
/libcore/dalvik/src/main/java/dalvik/system/ |
D | DexPathList.java | 23 import java.io.File; 80 private final List<File> nativeLibraryDirectories; 84 private final List<File> systemNativeLibraryDirectories; 92 private List<File> getAllNativeLibraryDirectories() { in getAllNativeLibraryDirectories() 93 List<File> allNativeLibraryDirectories = new ArrayList<>(nativeLibraryDirectories); in getAllNativeLibraryDirectories() 133 String librarySearchPath, File optimizedDirectory) { in DexPathList() 138 String librarySearchPath, File optimizedDirectory, boolean isTrusted) { in DexPathList() 201 public List<File> getNativeLibraryDirectories() { in getNativeLibraryDirectories() 214 public void addDexPath(String dexPath, File optimizedDirectory) { in addDexPath() 218 public void addDexPath(String dexPath, File optimizedDirectory, boolean isTrusted) { in addDexPath() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/prefs/ |
D | PreferencesTest.java | 20 import java.io.File; 39 private final File userLockFile; 40 private final File systemLockFile; 43 userLockFile = new File(root, "user.lock"); in TestPreferencesFactory() 44 systemLockFile = new File(root, "system.lock"); in TestPreferencesFactory() 60 private File temporaryDirectory; 79 final File userPrefsDir = new File(temporaryDirectory + "/user"); in testPreferencesClobbersExistingFiles() 81 final File userPrefs = new File(userPrefsDir, "prefs.xml"); in testPreferencesClobbersExistingFiles()
|
/libcore/ojluni/annotations/sdk/nullability/java/io/ |
D | File.annotated.java | 37 public class File implements java.io.Serializable, java.lang.Comparable<java.io.File> { class 39 public File(@libcore.util.NonNull java.lang.String pathname) { throw new RuntimeException("Stub!");… in File() method in File 41 public File(@libcore.util.Nullable java.lang.String parent, @libcore.util.NonNull java.lang.String … in File() method in File 43 public File(@libcore.util.Nullable java.io.File parent, @libcore.util.NonNull java.lang.String chil… in File() method in File 45 public File(@libcore.util.NonNull java.net.URI uri) { throw new RuntimeException("Stub!"); } in File() method in File 51 @libcore.util.Nullable public java.io.File getParentFile() { throw new RuntimeException("Stub!"); } in getParentFile() 59 @libcore.util.NonNull public java.io.File getAbsoluteFile() { throw new RuntimeException("Stub!"); } in getAbsoluteFile() 63 @libcore.util.NonNull public java.io.File getCanonicalFile() throws java.io.IOException { throw new… in getCanonicalFile() 96 public java.io.@libcore.util.NonNull File @libcore.util.Nullable [] listFiles() { throw new Runtime… in listFiles() 98 public java.io.@libcore.util.NonNull File @libcore.util.Nullable [] listFiles(@libcore.util.Nullabl… in listFiles() [all …]
|
/libcore/metrictests/memory/apps/src/libcore/heapdumper/ |
D | AbstractMetricInstrumentation.java | 25 import java.io.File; 52 private File mOutputDirectory; 77 protected final File resolveRelativeOutputFilename(String relativeOutputFilename) { in resolveRelativeOutputFilename() 78 return new File(mOutputDirectory, relativeOutputFilename); in resolveRelativeOutputFilename() 97 private static File resolveOutputDirectory(Bundle icicle) { in resolveOutputDirectory() 106 File dir = Environment.getExternalStoragePublicDirectory(relativeDirectoryName); in resolveOutputDirectory() 135 File errorFile = new File(mOutputDirectory, "error"); in recordException()
|
/libcore/ojluni/src/main/java/java/util/prefs/ |
D | FileSystemPreferences.java | 66 private static File systemRootDir; 76 private static File userRootDir; 100 new File(System.getProperty("java.util.prefs.userRoot", in setupUserRoot() 119 userLockFile = new File (userRootDir,".user.lock." + USER_NAME); in setupUserRoot() 120 userRootModFile = new File (userRootDir, in setupUserRoot() 163 new File(systemPrefsDirName, ".systemPrefs"); in setupSystemRoot() 169 new File(System.getProperty("java.home"), in setupSystemRoot() 189 systemLockFile = new File(systemRootDir, ".system.lock"); in setupSystemRoot() 191 new File (systemRootDir,".systemRootModFile"); in setupSystemRoot() 226 static File userLockFile; [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/jar/ |
D | JarOutputStreamTest.java | 19 import java.io.File; 38 File fooJar = File.createTempFile("hyts_", ".jar"); in test_JarOutputStreamLjava_io_OutputStreamLjava_util_jar_Manifest() 40 File barZip = File.createTempFile("hyts_", ".zip"); in test_JarOutputStreamLjava_io_OutputStreamLjava_util_jar_Manifest() 68 File fooJar = File.createTempFile("hyts_", ".jar"); in test_JarOutputStreamLjava_io_OutputStream()
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | OldURLClassLoaderTest.java | 20 import java.io.File; 83 File tmpDir = new File(tmp); in test_findResourcesLjava_lang_String() 84 File test1 = new File(tmp + "test0"); in test_findResourcesLjava_lang_String() 91 File subDir = new File(tmp + "subdir/"); in test_findResourcesLjava_lang_String() 93 File test2 = new File(tmp + "subdir/test0"); in test_findResourcesLjava_lang_String() 152 File file = File.createTempFile("test_getPermissions_fileURLConnection", "tmp"); in test_getPermissions_fileURLConnection_doesNotThrow() 223 File tmp = File.createTempFile("test", ".txt"); in test_findResourceLjava_lang_String() 248 File tempFile1 = File.createTempFile("textFile", ".txt"); in test_findResource_String() 251 File tempFile2 = File.createTempFile("jarFile", ".jar"); in test_findResource_String() 285 File f = new File(path); in getURLClassLoader()
|
/libcore/luni/src/test/java/libcore/xml/ |
D | XsltXPathConformanceTestSuite.java | 20 import java.io.File; 135 File catalogXml = new File(args[0]); in main() 140 return suite(new File(defaultCatalogFile)); in suite() 146 public static Test suite(File catalogXml) throws Exception { in suite() 171 File base = new File(catalogXml.getParentFile(), majorPath); in suite() 184 private TestCase create(File base, Element testCaseElement) { in create() 237 File inBase = new File(base, testDirectory); in create() 238 File outBase = new File(new File(base, "REF_OUT"), testDirectory); in create() 246 File principalData = findFile(inBase, principalDataElement.getTextContent()); in create() 247 … File principalStylesheet = findFile(inBase, principalStylesheetElement.getTextContent()); in create() [all …]
|