/frameworks/base/core/tests/coretests/src/android/os/ |
D | FileUtilsTest.java | 19 import static android.os.FileUtils.roundStorageSize; 30 import android.os.FileUtils.MemoryPipe; 77 FileUtils.deleteContents(mTarget); in setUp() 83 FileUtils.deleteContents(mTarget); in tearDown() 92 FileUtils.copyFile(mTestFile, mCopyFile); in testCopyFile() 94 assertEquals(TEST_DATA, FileUtils.readTextFile(mCopyFile, 0, null)); in testCopyFile() 101 FileUtils.copyToFile(new ByteArrayInputStream(s.getBytes()), mCopyFile); in testCopyToFile() 103 assertEquals(s, FileUtils.readTextFile(mCopyFile, 0, null)); in testCopyToFile() 119 FileUtils.copy(in, out); in testCopy_FileToFile() 139 FileUtils.copy(in.getFD(), out.getFD()); in testCopy_FileToPipe() [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; 134 FileUtils.setPermissions( in startWrite() 136 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH, in startWrite() 155 FileUtils.sync(str); in finishWrite() 176 FileUtils.sync(str); in failWrite() 193 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/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/core/java/com/android/server/pm/ |
D | UserDataPreparer.java | 24 import android.os.FileUtils; 144 FileUtils.deleteContentsAndDir(getUserSystemDirectory(userId)); in destroyUserDataLI() 145 FileUtils.deleteContentsAndDir(getDataSystemDeDirectory(userId)); in destroyUserDataLI() 148 FileUtils.deleteContentsAndDir(getDataSystemCeDirectory(userId)); in destroyUserDataLI() 168 Collections.addAll(files, FileUtils in reconcileUsers() 170 Collections.addAll(files, FileUtils in reconcileUsers() 172 Collections.addAll(files, FileUtils in reconcileUsers() 174 Collections.addAll(files, FileUtils in reconcileUsers() 176 Collections.addAll(files, FileUtils in reconcileUsers()
|
/frameworks/base/core/tests/benchmarks/src/android/os/ |
D | FileUtilsBenchmark.java | 19 import static android.os.FileUtils.copyInternalSendfile; 20 import static android.os.FileUtils.copyInternalSplice; 21 import static android.os.FileUtils.copyInternalUserspace; 23 import android.os.FileUtils.MemoryPipe;
|
/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() 165 assertEquals(Collections.emptyList(), Arrays.asList(FileUtils.listFilesOrEmpty(systemDir))); in testDestroyUserData_De() 166 assertEquals(Collections.emptyList(), Arrays.asList(FileUtils.listFilesOrEmpty( in testDestroyUserData_De() 183 assertEquals(Collections.emptyList(), Arrays.asList(FileUtils.listFilesOrEmpty( in testDestroyUserData_Ce()
|
/frameworks/base/core/java/android/database/sqlite/ |
D | SQLiteOpenHelper.java | 26 import android.os.FileUtils; 426 int perms = FileUtils.S_IRUSR | FileUtils.S_IWUSR | FileUtils.S_IRGRP | FileUtils.S_IWGRP; in setFilePermissionsForDb() 427 FileUtils.setPermissions(dbPath, perms, -1, -1); in setFilePermissionsForDb()
|
/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/services/usb/java/com/android/server/usb/ |
D | UsbDebuggingManager.java | 32 import android.os.FileUtils; 415 FileUtils.setPermissions(keyFile.toString(), in writeKey() 416 FileUtils.S_IRUSR | FileUtils.S_IWUSR | in writeKey() 417 FileUtils.S_IRGRP, -1, -1); in writeKey() 469 FileUtils.readTextFile(new File("/data/misc/adb/adb_keys"), 0, null)); in dump() 476 FileUtils.readTextFile(new File("/adb_keys"), 0, null)); in dump()
|
/frameworks/base/core/java/com/android/internal/content/ |
D | FileSystemProvider.java | 34 import android.os.FileUtils; 113 return FileUtils.contains(parent, doc); in isChildDocument() 165 if (!FileUtils.contains(parent, doc)) { in findDocumentPath() 170 while (doc != null && FileUtils.contains(parent, doc)) { in findDocumentPath() 182 displayName = FileUtils.buildValidFatFilename(displayName); in createDocument() 189 final File file = FileUtils.buildUniqueFile(parent, mimeType, displayName); in createDocument() 236 displayName = FileUtils.buildValidFatFilename(displayName); in renameDocument() 239 final File after = FileUtils.buildUniqueFile(before.getParentFile(), displayName); in renameDocument() 321 FileUtils.deleteContents(file); in deleteDocument()
|
/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/core/tests/coretests/src/com/android/internal/os/ |
D | KernelCpuProcReaderTest.java | 25 import android.os.FileUtils; 73 FileUtils.deleteContents(mTestDir); in tearDown() 74 FileUtils.deleteContents(mRoot); in tearDown()
|
/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/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/tests/coretests/src/android/content/res/ |
D | ResourcesLocaleTest.java | 18 import android.os.FileUtils; 38 FileUtils.copyToFileOrThrow(is, path); in extractApkAndGetPath()
|
/frameworks/base/core/tests/packagemanagertests/src/android/content/pm/ |
D | KernelPackageMappingTests.java | 26 import android.os.FileUtils; 76 return FileUtils.readTextFile(file, 0, null).trim(); in getContent()
|
/frameworks/base/core/java/com/android/server/ |
D | BootReceiver.java | 27 import android.os.FileUtils; 155 return FileUtils.readTextFile(lastHeaderFile, 0, null); in getPreviousBootHeaders() 170 .append(FileUtils.readTextFile(new File("/proc/version"), 1024, "...\n")) in getCurrentBootHeaders() 180 FileUtils.stringToFile(lastHeaderFile, newHeaders); in getBootHeadersToLogAndUpdate() 304 String fileContents = FileUtils.readTextFile(file, maxSize, "[[TRUNCATED]]\n"); in addFileWithFootersToDropBox() 345 String log = FileUtils.readTextFile(file, maxSize, "[[TRUNCATED]]\n"); in addAuditErrorsToDropBox() 370 String log = FileUtils.readTextFile(file, maxSize, "[[TRUNCATED]]\n"); in addFsckErrorsToDropBoxAndLogFsStat() 413 metricsStr = FileUtils.readTextFile(metricsFile, 0, null); in logSystemServerShutdownTimeMetrics() 525 lines = FileUtils.readTextFile(f, -maxReadSize, null); in logFsShutdownTime()
|