/frameworks/base/core/tests/coretests/src/android/os/ |
D | FileUtilsTest.java | 58 FileUtils.deleteContents(mTarget); in setUp() 64 FileUtils.deleteContents(mTarget); in tearDown() 72 FileUtils.copyFile(mTestFile, mCopyFile); in testCopyFile() 74 assertEquals(TEST_DATA, FileUtils.readTextFile(mCopyFile, 0, null)); in testCopyFile() 80 FileUtils.copyToFile(new ByteArrayInputStream(s.getBytes()), mCopyFile); in testCopyToFile() 82 assertEquals(s, FileUtils.readTextFile(mCopyFile, 0, null)); in testCopyToFile() 86 assertTrue(FileUtils.isFilenameSafe(new File("foobar"))); in testIsFilenameSafe() 87 assertTrue(FileUtils.isFilenameSafe(new File("a_b-c=d.e/0,1+23"))); in testIsFilenameSafe() 88 assertFalse(FileUtils.isFilenameSafe(new File("foo*bar"))); in testIsFilenameSafe() 89 assertFalse(FileUtils.isFilenameSafe(new File("foo\nbar"))); in testIsFilenameSafe() [all …]
|
/frameworks/base/core/java/com/android/internal/os/ |
D | AtomicFile.java | 19 import android.os.FileUtils; 76 FileUtils.setPermissions( in startWrite() 78 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH, in startWrite() 91 FileUtils.sync(str); in finishWrite() 103 FileUtils.sync(str); in failWrite() 125 FileUtils.sync(fos); in truncate()
|
/frameworks/base/core/java/android/util/ |
D | AtomicFile.java | 19 import android.os.FileUtils; 108 FileUtils.setPermissions( in startWrite() 110 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH, in startWrite() 129 FileUtils.sync(str); in finishWrite() 146 FileUtils.sync(str); in failWrite() 163 FileUtils.sync(fos); in truncate()
|
/frameworks/data-binding/compilationTests/src/test/java/android/databinding/compilationTest/ |
D | BaseCompilationTest.java | 19 import org.apache.commons.io.FileUtils; 90 for (File item : FileUtils.listFiles(folder, null, true)) { in copyResourceDirectory() 103 FileUtils.forceDelete(testFolder); in clear() 119 List<String> lines = FileUtils.readLines(file); in extract() 140 FileUtils.forceMkdir(directory); in copyResourceTo() 185 FileUtils.writeStringToFile(targetFile, out.toString()); in copyResourceTo() 209 FileUtils.forceMkdir(testFolder); in prepareApp() 217 FileUtils.copyFile(localProperties, new File(testFolder, "local.properties")); in prepareApp() 219 …FileUtils.copyFile(new File("../propLoader.gradle"), new File(testFolder, "propLoaderClone.gradle"… in prepareApp() 220 FileUtils.copyFile(new File("../gradlew"), new File(testFolder, "gradlew")); in prepareApp() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/ |
D | MountServiceTests.java | 22 import android.os.FileUtils; 129 FileUtils.setPermissions(outFile.getPath(), FileUtils.S_IRWXU | FileUtils.S_IRWXG in copyRawToFile() 130 | FileUtils.S_IRWXO, -1, -1); in copyRawToFile() 131 assertTrue(FileUtils.copyToFile(is, outFile)); in copyRawToFile() 132 FileUtils.setPermissions(outFile.getPath(), FileUtils.S_IRWXU | FileUtils.S_IRWXG in copyRawToFile() 133 | FileUtils.S_IRWXO, -1, -1); in copyRawToFile()
|
D | EntropyMixerTest.java | 20 import android.os.FileUtils; 34 assertEquals(0, FileUtils.readTextFile(file, 0, null).length()); in testInitialWrite() 39 assertTrue(FileUtils.readTextFile(file, 0, null).length() > 0); in testInitialWrite()
|
/frameworks/base/keystore/java/android/security/ |
D | SystemKeyStore.java | 20 import android.os.FileUtils; 95 FileUtils.sync(fos); in generateNewKey() 97 FileUtils.setPermissions(keyFile.getName(), (FileUtils.S_IRUSR | FileUtils.S_IWUSR), in generateNewKey()
|
/frameworks/base/core/tests/coretests/src/android/os/storage/ |
D | StorageManagerBaseTest.java | 27 import android.os.FileUtils; 237 FileUtils.setPermissions(outFile.getPath(), FileUtils.S_IRWXU | FileUtils.S_IRWXG in copyRawToFile() 238 | FileUtils.S_IRWXO, -1, -1); in copyRawToFile() 239 assertTrue(FileUtils.copyToFile(is, outFile)); in copyRawToFile() 240 FileUtils.setPermissions(outFile.getPath(), FileUtils.S_IRWXU | FileUtils.S_IRWXG in copyRawToFile() 241 | FileUtils.S_IRWXO, -1, -1); in copyRawToFile()
|
/frameworks/base/test-runner/src/android/test/ |
D | RenamingDelegatingContext.java | 26 import android.os.FileUtils; 236 FileUtils.setPermissions( in getCacheDir() 238 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH, in getCacheDir()
|
/frameworks/data-binding/compilerCommon/src/main/java/android/databinding/tool/writer/ |
D | JavaFileWriter.java | 16 import org.apache.commons.io.FileUtils; 30 FileUtils.writeStringToFile(exactPath, contents); in writeToFile()
|
/frameworks/base/services/usb/java/com/android/server/usb/ |
D | UsbDebuggingManager.java | 29 import android.os.FileUtils; 413 FileUtils.setPermissions(keyFile.toString(), in writeKey() 414 FileUtils.S_IRUSR | FileUtils.S_IWUSR | in writeKey() 415 FileUtils.S_IRGRP, -1, -1); in writeKey() 461 pw.println(FileUtils.readTextFile(new File("/data/misc/adb/adb_keys"), 0, null)); in dump() 467 pw.println(FileUtils.readTextFile(new File("/adb_keys"), 0, null)); in dump()
|
/frameworks/base/core/java/com/android/server/ |
D | BootReceiver.java | 27 import android.os.FileUtils; 107 .append(FileUtils.readTextFile(new File("/proc/version"), 1024, "...\n")) in logBootEvents() 207 … db.addText(tag, headers + FileUtils.readTextFile(file, maxSize, "[[TRUNCATED]]\n") + footers); in addFileWithFootersToDropBox() 232 String log = FileUtils.readTextFile(file, maxSize, "[[TRUNCATED]]\n"); in addAuditErrorsToDropBox() 253 String log = FileUtils.readTextFile(file, maxSize, "[[TRUNCATED]]\n"); in addFsckErrorsToDropBox()
|
/frameworks/base/core/java/com/android/internal/content/ |
D | PackageHelper.java | 28 import android.os.FileUtils; 285 FileUtils.sync(fstr); in extractPublicFiles() 287 FileUtils.setPermissions(publicZipFile.getAbsolutePath(), FileUtils.S_IRUSR in extractPublicFiles() 288 | FileUtils.S_IWUSR | FileUtils.S_IRGRP | FileUtils.S_IROTH, -1, -1); in extractPublicFiles()
|
/frameworks/base/core/java/android/app/ |
D | SharedPreferencesImpl.java | 21 import android.os.FileUtils; 554 FileUtils.setPermissions( in createFileOutputStream() 556 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH, in createFileOutputStream() 601 FileUtils.sync(str); in writeToFile()
|
D | ContextImpl.java | 55 import android.os.FileUtils; 401 FileUtils.setPermissions( in openFileOutput() 403 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH, in openFileOutput() 427 FileUtils.setPermissions( in createFilesDirLocked() 429 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH, in createFilesDirLocked() 1763 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH); in getDir() 1901 int perms = FileUtils.S_IRUSR|FileUtils.S_IWUSR in setFilePermissionsFromMode() 1902 |FileUtils.S_IRGRP|FileUtils.S_IWGRP in setFilePermissionsFromMode() 1905 perms |= FileUtils.S_IROTH; in setFilePermissionsFromMode() 1908 perms |= FileUtils.S_IWOTH; in setFilePermissionsFromMode() [all …]
|
/frameworks/data-binding/compiler/src/main/java/android/databinding/tool/util/ |
D | GenerationalClassUtil.java | 19 import org.apache.commons.io.FileUtils; 90 for (File file : FileUtils.listFiles(directory, TrueFileFilter.INSTANCE, in loadFromDirectory() 96 inputStream = FileUtils.openInputStream(file); in loadFromDirectory()
|
/frameworks/base/services/core/java/com/android/server/ |
D | CertBlacklister.java | 23 import android.os.FileUtils; 93 FileUtils.sync(out); in writeBlacklist()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/ |
D | UserManagerServiceTest.java | 20 import android.os.FileUtils; 51 String s = FileUtils.readTextFile(restrictionsFile, 10000, ""); in testWriteReadApplicationRestrictions()
|
/frameworks/data-binding/compiler/src/main/java/android/databinding/annotationprocessor/ |
D | ProcessExpressions.java | 19 import org.apache.commons.io.FileUtils; 111 result.addEntry(layoutFile.getName(), FileUtils.readFileToString(layoutFile)); in createIntermediateFromLayouts() 140 FileUtils.write(new File(exportClassNamesTo), out); in writeResourceBundle()
|
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/ |
D | SettingsBackupAgent.java | 31 import android.os.FileUtils; 486 FileUtils.setPermissions(FILE_WIFI_SUPPLICANT, in run() 487 FileUtils.S_IRUSR | FileUtils.S_IWUSR | in run() 488 FileUtils.S_IRGRP | FileUtils.S_IWGRP, in run() 674 FileUtils.setPermissions(FILE_WIFI_SUPPLICANT, in onRestoreFile() 675 FileUtils.S_IRUSR | FileUtils.S_IWUSR | in onRestoreFile() 676 FileUtils.S_IRGRP | FileUtils.S_IWGRP, in onRestoreFile()
|
/frameworks/base/packages/ExternalStorageProvider/src/com/android/externalstorage/ |
D | ExternalStorageProvider.java | 30 import android.os.FileUtils; 323 return FileUtils.contains(parent, doc); in isChildDocument() 333 displayName = FileUtils.buildValidFatFilename(displayName); in createDocument() 340 final File file = FileUtils.buildUniqueFile(parent, mimeType, displayName); in createDocument() 362 displayName = FileUtils.buildValidFatFilename(displayName); in renameDocument() 384 FileUtils.deleteContents(file); in deleteDocument()
|
/frameworks/data-binding/compiler/src/main/java/android/databinding/tool/reflection/ |
D | SdkUtil.java | 16 import org.apache.commons.io.FileUtils; 89 inputStream = FileUtils.openInputStream(apiFile); in ApiChecker()
|
/frameworks/base/packages/Shell/src/com/android/shell/ |
D | BugreportStorageProvider.java | 23 import android.os.FileUtils; 145 !FileUtils.isValidExtFilename(name)) { in getFileForDocId()
|
/frameworks/support/tests/java/android/support/v4/provider/ |
D | DocumentFileTest.java | 23 import android.os.FileUtils; 82 FileUtils.deleteContents(tmp); in resetRoot() 85 FileUtils.deleteContents(rootMeow); in resetRoot()
|
/frameworks/base/core/tests/coretests/src/android/content/pm/ |
D | RegisteredServicesCacheTest.java | 20 import android.os.FileUtils; 67 FileUtils.deleteContents(mDataDir); in setUp() 166 FileUtils.copyToFile(new ByteArrayInputStream(oldFile.getBytes()), file); in testMigration()
|