/frameworks/base/core/tests/coretests/src/android/os/ |
D | FileUtilsTest.java | 19 import static android.os.FileUtils.roundStorageSize; 59 FileUtils.deleteContents(mTarget); in setUp() 65 FileUtils.deleteContents(mTarget); in tearDown() 73 FileUtils.copyFile(mTestFile, mCopyFile); in testCopyFile() 75 assertEquals(TEST_DATA, FileUtils.readTextFile(mCopyFile, 0, null)); in testCopyFile() 81 FileUtils.copyToFile(new ByteArrayInputStream(s.getBytes()), mCopyFile); in testCopyToFile() 83 assertEquals(s, FileUtils.readTextFile(mCopyFile, 0, null)); in testCopyToFile() 87 assertTrue(FileUtils.isFilenameSafe(new File("foobar"))); in testIsFilenameSafe() 88 assertTrue(FileUtils.isFilenameSafe(new File("a_b-c=d.e/0,1+23"))); in testIsFilenameSafe() 89 assertFalse(FileUtils.isFilenameSafe(new File("foo*bar"))); 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; 110 FileUtils.setPermissions( in startWrite() 112 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH, in startWrite() 131 FileUtils.sync(str); in finishWrite() 148 FileUtils.sync(str); in failWrite() 165 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 …]
|
/frameworks/base/services/core/java/com/android/server/pm/ |
D | UserDataPreparer.java | 22 import android.os.FileUtils; 134 FileUtils.deleteContentsAndDir(getUserSystemDirectory(userId)); in destroyUserDataLI() 135 FileUtils.deleteContentsAndDir(getDataSystemDeDirectory(userId)); in destroyUserDataLI() 136 FileUtils.deleteContentsAndDir(getDataMiscDeDirectory(userId)); in destroyUserDataLI() 139 FileUtils.deleteContentsAndDir(getDataSystemCeDirectory(userId)); in destroyUserDataLI() 140 FileUtils.deleteContentsAndDir(getDataMiscCeDirectory(userId)); in destroyUserDataLI() 160 Collections.addAll(files, FileUtils in reconcileUsers() 162 Collections.addAll(files, FileUtils in reconcileUsers() 164 Collections.addAll(files, FileUtils in reconcileUsers() 166 Collections.addAll(files, FileUtils in reconcileUsers() [all …]
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | LastMileLoggerTest.java | 27 import android.os.FileUtils; 61 FileUtils.stringToFile(mTraceEnableFile, "0"); in setUp() 218 FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect"); in dumpShowsFailureTrace() 229 FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect"); in dumpShowsFailureTraceEvenIfConnectionIdIncreases() 240 FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect"); in dumpShowsPendingConnectionTrace() 250 FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect try #1"); in dumpShowsLastFailureTraceAndPendingConnectionTrace() 255 FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect try #2"); in dumpShowsLastFailureTraceAndPendingConnectionTrace() 266 FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect try #1"); in dumpShowsLastFailureTraceAndCurrentConnectionTrace() 271 FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect try #2"); in dumpShowsLastFailureTraceAndCurrentConnectionTrace() 284 FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect"); in dumpDoesNotClearLastFailureData() [all …]
|
/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/services/tests/servicestests/src/com/android/server/pm/ |
D | UserDataPreparerTest.java | 21 import android.os.FileUtils; 81 FileUtils.deleteContents(ctx.getCacheDir()); in setup() 139 assertEquals(Collections.singletonList(ceFile), Arrays.asList(FileUtils.listFilesOrEmpty( in testDestroyUserData() 145 assertEquals(Collections.emptyList(), Arrays.asList(FileUtils.listFilesOrEmpty( in testDestroyUserData() 168 assertEquals(Collections.emptyList(), Arrays.asList(FileUtils.listFilesOrEmpty(systemDir))); in testDestroyUserData_De() 169 assertEquals(Collections.emptyList(), Arrays.asList(FileUtils.listFilesOrEmpty( in testDestroyUserData_De() 171 assertEquals(Collections.emptyList(), Arrays.asList(FileUtils.listFilesOrEmpty( in testDestroyUserData_De() 191 assertEquals(Collections.emptyList(), Arrays.asList(FileUtils.listFilesOrEmpty( in testDestroyUserData_Ce() 193 assertEquals(Collections.emptyList(), Arrays.asList(FileUtils.listFilesOrEmpty( in testDestroyUserData_Ce()
|
/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; 240 FileUtils.setPermissions( in getCacheDir() 242 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH, in getCacheDir()
|
/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/services/core/java/com/android/server/updates/ |
D | CertificateTransparencyLogInstallReceiver.java | 20 import android.os.FileUtils; 79 FileUtils.deleteContentsAndDir(newVersion); in install() 117 FileUtils.deleteContentsAndDir(newVersion); in install() 178 FileUtils.deleteContentsAndDir(f); in deleteOldLogDirectories()
|
/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/opt/net/wifi/service/java/com/android/server/wifi/ |
D | LastMileLogger.java | 19 import android.os.FileUtils; 117 FileUtils.stringToFile(mEventEnablePath, "1"); in enableTracing() 125 FileUtils.stringToFile(mEventEnablePath, "0"); in disableTracing()
|
/frameworks/base/core/java/com/android/internal/content/ |
D | FileSystemProvider.java | 32 import android.os.FileUtils; 94 return FileUtils.contains(parent, doc); in isChildDocument() 108 if (!FileUtils.contains(parent, doc)) { in findDocumentPath() 113 while (doc != null && FileUtils.contains(parent, doc)) { in findDocumentPath() 125 displayName = FileUtils.buildValidFatFilename(displayName); in createDocument() 132 final File file = FileUtils.buildUniqueFile(parent, mimeType, displayName); in createDocument() 171 displayName = FileUtils.buildValidFatFilename(displayName); in renameDocument() 174 final File after = FileUtils.buildUniqueFile(before.getParentFile(), displayName); in renameDocument() 243 FileUtils.deleteContents(file); in deleteDocument()
|
/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/base/core/java/com/android/server/ |
D | BootReceiver.java | 27 import android.os.FileUtils; 144 return FileUtils.readTextFile(lastHeaderFile, 0, null); in getPreviousBootHeaders() 160 .append(FileUtils.readTextFile(new File("/proc/version"), 1024, "...\n")) in getCurrentBootHeaders() 170 FileUtils.stringToFile(lastHeaderFile, newHeaders); in getBootHeadersToLogAndUpdate() 291 db.addText(tag, headers + FileUtils.readTextFile(file, maxSize, "[[TRUNCATED]]\n") + in addFileWithFootersToDropBox() 316 String log = FileUtils.readTextFile(file, maxSize, "[[TRUNCATED]]\n"); in addAuditErrorsToDropBox() 341 String log = FileUtils.readTextFile(file, maxSize, "[[TRUNCATED]]\n"); in addFsckErrorsToDropBoxAndLogFsStat() 394 lines = FileUtils.readTextFile(f, -maxReadSize, null); in logFsShutdownTime()
|
/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; 79 FileUtils.deleteOlderFiles(bugreportFile.getParentFile(), minCount, minAge); in cleanupOldFiles()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/retaildemo/ |
D | PreloadAppsInstallerTest.java | 31 import android.os.FileUtils; 96 FileUtils.deleteContentsAndDir(mPreloadsAppsDirectory); in tearDown() 123 FileUtils.deleteContents(mPreloadsAppsDirectory); in testInstallApps_noPreloads()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/ |
D | LegacyPasspointConfigParserTest.java | 21 import android.os.FileUtils; 113 FileUtils.stringToFile(configFile, data); in parseConfig()
|
/frameworks/base/core/java/android/app/ |
D | DexLoadReporter.java | 19 import android.os.FileUtils; 155 if (FileUtils.contains(dataDir, dexPath)) { in isSecondaryDexFile()
|
/frameworks/base/core/tests/coretests/src/android/content/res/ |
D | ResourcesLocaleTest.java | 18 import android.os.FileUtils; 38 FileUtils.copyToFileOrThrow(is, path); in extractApkAndGetPath()
|