/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/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/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/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"), in prepareApp() 221 FileUtils.copyFile(new File("../gradlew"), new File(testFolder, "gradlew")); in prepareApp() [all …]
|
D | SimpleCompilationTest.java | 20 import org.apache.commons.io.FileUtils; 78 Collection<File> layoutFiles = FileUtils.listFiles(debugOut, new SuffixFileFilter(".xml"), in testMultipleConfigs() 82 final String contents = FileUtils.readFileToString(layout); in testMultipleConfigs()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/ |
D | MountServiceTests.java | 22 import android.os.FileUtils; 117 FileUtils.setPermissions(outFile.getPath(), FileUtils.S_IRWXU | FileUtils.S_IRWXG in copyRawToFile() 118 | FileUtils.S_IRWXO, -1, -1); in copyRawToFile() 119 assertTrue(FileUtils.copyToFile(is, outFile)); in copyRawToFile() 120 FileUtils.setPermissions(outFile.getPath(), FileUtils.S_IRWXU | FileUtils.S_IRWXG in copyRawToFile() 121 | 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/data-binding/compilerCommon/src/main/java/android/databinding/tool/ |
D | LayoutXmlProcessor.java | 18 import org.apache.commons.io.FileUtils; 113 FileUtils.deleteDirectory(input.getRootOutputFolder()); in processAllInputFiles() 172 FileUtils.copyFile(file, new File(outParent, file.getName())); in processResources() 179 FileUtils.deleteQuietly(out); in processResources() 185 FileUtils.deleteQuietly(new File(outParent, file.getName())); in processResources() 204 FileUtils.copyDirectory(file, outFile); in processResources() 206 FileUtils.copyFile(file, outFile); in processResources() 213 FileUtils.deleteQuietly(outFile); in processResources() 244 FileUtils.deleteQuietly(new File(xmlOutDir, exportFileName)); in writeLayoutInfoFiles()
|
/frameworks/base/test-runner/src/android/test/ |
D | RenamingDelegatingContext.java | 26 import android.os.FileUtils; 240 FileUtils.setPermissions( in getCacheDir() 242 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH, in getCacheDir()
|
/frameworks/base/services/usb/java/com/android/server/usb/ |
D | UsbDebuggingManager.java | 30 import android.os.FileUtils; 414 FileUtils.setPermissions(keyFile.toString(), in writeKey() 415 FileUtils.S_IRUSR | FileUtils.S_IWUSR | in writeKey() 416 FileUtils.S_IRGRP, -1, -1); in writeKey() 462 pw.println(FileUtils.readTextFile(new File("/data/misc/adb/adb_keys"), 0, null)); in dump() 468 pw.println(FileUtils.readTextFile(new File("/adb_keys"), 0, null)); in dump()
|
/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/core/java/com/android/internal/content/ |
D | PackageHelper.java | 28 import android.os.FileUtils; 288 FileUtils.sync(fstr); in extractPublicFiles() 290 FileUtils.setPermissions(publicZipFile.getAbsolutePath(), FileUtils.S_IRUSR in extractPublicFiles() 291 | 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; 406 final File[] sourceFiles = FileUtils.listFilesOrEmpty(sourceDir, new FilenameFilter() { in moveFiles() 418 FileUtils.copyFileOrThrow(sourceFile, targetFile); in moveFiles() 419 FileUtils.copyPermissions(sourceFile, targetFile); in moveFiles() 502 FileUtils.setPermissions( in openFileOutput() 504 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH, in openFileOutput() 660 return FileUtils.listOrEmpty(getFilesDir()); in fileList() 717 FileUtils.setPermissions(dir.getPath(), in getDatabasePath() 718 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH, in getDatabasePath() 731 return FileUtils.listOrEmpty(getDatabasesDir()); in databaseList() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/usage/ |
D | AppIdleHistoryTests.java | 19 import android.os.FileUtils; 40 FileUtils.deleteContents(mStorageDir); in tearDown()
|
/frameworks/base/packages/Shell/src/com/android/shell/ |
D | BugreportReceiver.java | 31 import android.os.FileUtils; 80 FileUtils.deleteOlderFiles(bugreportFile.getParentFile(), minCount, minAge); in cleanupOldFiles()
|
/frameworks/data-binding/compiler/src/main/java/android/databinding/tool/util/ |
D | GenerationalClassUtil.java | 19 import org.apache.commons.io.FileUtils; 92 for (File file : FileUtils.listFiles(directory, TrueFileFilter.INSTANCE, in loadFromDirectory() 98 inputStream = FileUtils.openInputStream(file); in loadFromDirectory()
|
/frameworks/base/core/java/com/android/server/ |
D | BootReceiver.java | 27 import android.os.FileUtils; 126 .append(FileUtils.readTextFile(new File("/proc/version"), 1024, "...\n")) in logBootEvents() 228 db.addText(tag, headers + FileUtils.readTextFile(file, maxSize, "[[TRUNCATED]]\n") + in addFileWithFootersToDropBox() 253 String log = FileUtils.readTextFile(file, maxSize, "[[TRUNCATED]]\n"); in addAuditErrorsToDropBox() 275 String log = FileUtils.readTextFile(file, maxSize, "[[TRUNCATED]]\n"); in addFsckErrorsToDropBox()
|
/frameworks/base/core/tests/coretests/src/android/content/res/ |
D | ResourcesLocaleTest.java | 18 import android.os.FileUtils; 38 FileUtils.copyToFileOrThrow(is, path); in extractApkAndGetPath()
|
/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 | 21 import android.os.FileUtils; 58 String s = FileUtils.readTextFile(restrictionsFile, 10000, ""); in testWriteReadApplicationRestrictions()
|
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/ |
D | SettingsBackupAgent.java | 33 import android.os.FileUtils; 530 FileUtils.setPermissions(FILE_WIFI_SUPPLICANT, in run() 531 FileUtils.S_IRUSR | FileUtils.S_IWUSR in run() 532 | FileUtils.S_IRGRP | FileUtils.S_IWGRP, in run() 760 FileUtils.setPermissions(FILE_WIFI_SUPPLICANT, in onRestoreFile() 761 FileUtils.S_IRUSR | FileUtils.S_IWUSR in onRestoreFile() 762 | FileUtils.S_IRGRP | FileUtils.S_IWGRP, in onRestoreFile()
|
/frameworks/data-binding/compiler/src/main/java/android/databinding/annotationprocessor/ |
D | ProcessExpressions.java | 21 import org.apache.commons.io.FileUtils; 137 result.addEntry(layoutFile.getName(), FileUtils.readFileToString(layoutFile)); in createIntermediateFromLayouts() 166 FileUtils.write(new File(exportClassNamesTo), out); in writeResourceBundle()
|