/frameworks/base/core/tests/coretests/src/android/os/ |
D | FileUtilsTest.java | 19 import static android.os.FileUtils.roundStorageSize; 20 import static android.os.FileUtils.translateModeAccessToPosix; 21 import static android.os.FileUtils.translateModePfdToPosix; 22 import static android.os.FileUtils.translateModePosixToPfd; 23 import static android.os.FileUtils.translateModePosixToString; 24 import static android.os.FileUtils.translateModeStringToPosix; 52 import android.os.FileUtils.MemoryPipe; 99 FileUtils.deleteContents(mTarget); in setUp() 104 FileUtils.deleteContents(mDir); in tearDown() 105 FileUtils.deleteContents(mTarget); in tearDown() [all …]
|
/frameworks/base/core/java/com/android/internal/os/ |
D | AtomicFile.java | 21 import android.os.FileUtils; 81 FileUtils.setPermissions( in startWrite() 83 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH, in startWrite() 97 FileUtils.sync(str); in finishWrite() 110 FileUtils.sync(str); in failWrite() 134 FileUtils.sync(fos); in truncate()
|
D | AtomicDirectory.java | 21 import android.os.FileUtils; 158 FileUtils.sync(destination); in closeWrite() 227 FileUtils.setPermissions(mBaseDirectory.getPath(), in getOrCreateBaseDirectory() 228 FileUtils.S_IRWXU | FileUtils.S_IRWXG | FileUtils.S_IXOTH, in getOrCreateBaseDirectory()
|
/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/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() 177 FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect"); in dumpShowsFailureTrace() 187 FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect"); in dumpShowsPendingConnectionTrace() 196 FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect try #1"); in dumpShowsLastFailureTraceAndPendingConnectionTrace() 199 FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect try #2"); in dumpShowsLastFailureTraceAndPendingConnectionTrace() 209 FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect try #1"); in dumpShowsLastFailureTraceAndCurrentConnectionTrace() 212 FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect try #2"); in dumpShowsLastFailureTraceAndCurrentConnectionTrace() 223 FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect"); in dumpDoesNotClearLastFailureData() 234 FileUtils.stringToFile(mTraceDataFile.getPath(), "rdev_connect"); in dumpDoesNotClearPendingConnectionTrace()
|
/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/services/devicepolicy/java/com/android/server/devicepolicy/ |
D | UpdateInstaller.java | 28 import android.os.FileUtils; 123 FileUtils.setPermissions( in createNewFileWithPermissions() 125 /* mode= */ FileUtils.S_IRWXU | FileUtils.S_IRGRP | FileUtils.S_IROTH, in createNewFileWithPermissions() 134 FileUtils.copy(in, out); in copyToFile()
|
/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()
|
D | PackageAbiHelperImpl.java | 34 import android.os.FileUtils; 56 if (FileUtils.contains(Environment.getRootDirectory(), codePath)) { in calculateBundledApkRoot() 58 } else if (FileUtils.contains(Environment.getOemDirectory(), codePath)) { in calculateBundledApkRoot() 60 } else if (FileUtils.contains(Environment.getVendorDirectory(), codePath)) { in calculateBundledApkRoot() 62 } else if (FileUtils.contains(Environment.getOdmDirectory(), codePath)) { in calculateBundledApkRoot() 64 } else if (FileUtils.contains(Environment.getProductDirectory(), codePath)) { in calculateBundledApkRoot() 66 } else if (FileUtils.contains(Environment.getSystemExtDirectory(), codePath)) { in calculateBundledApkRoot() 68 } else if (FileUtils.contains(Environment.getOdmDirectory(), codePath)) { in calculateBundledApkRoot() 70 } else if (FileUtils.contains(Environment.getApexDirectory(), codePath)) { in calculateBundledApkRoot()
|
/frameworks/base/services/core/java/com/android/server/ |
D | ZramWriteback.java | 25 import android.os.FileUtils; 68 FileUtils.stringToFile(new File(idlePath), IDLE_SYS_ALL_PAGES); in markPagesAsIdle() 78 FileUtils.stringToFile(new File(wbPath), WB_SYS_IDLE_PAGES); in flushIdlePages() 88 String wbStats = FileUtils in getWrittenPageCount() 111 String backingDev = FileUtils in isWritebackEnabled()
|
D | ExtconStateObserver.java | 20 import android.os.FileUtils; 49 FileUtils.readTextFile(new File(statePath), 0, null).trim()); in parseStateFromFile()
|
/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 | 27 import android.os.FileUtils; 82 FileUtils.deleteContents(ctx.getCacheDir()); in setup() 140 assertEquals(Collections.singletonList(ceFile), Arrays.asList(FileUtils.listFilesOrEmpty( in testDestroyUserData() 146 assertEquals(Collections.emptyList(), Arrays.asList(FileUtils.listFilesOrEmpty( in testDestroyUserData() 166 assertEquals(Collections.emptyList(), Arrays.asList(FileUtils.listFilesOrEmpty(systemDir))); in testDestroyUserData_De() 167 assertEquals(Collections.emptyList(), Arrays.asList(FileUtils.listFilesOrEmpty( in testDestroyUserData_De() 184 assertEquals(Collections.emptyList(), Arrays.asList(FileUtils.listFilesOrEmpty( in testDestroyUserData_Ce()
|
/frameworks/base/core/java/android/database/sqlite/ |
D | SQLiteOpenHelper.java | 27 import android.os.FileUtils; 445 int perms = FileUtils.S_IRUSR | FileUtils.S_IWUSR | FileUtils.S_IRGRP | FileUtils.S_IWGRP; in setFilePermissionsForDb() 446 FileUtils.setPermissions(dbPath, perms, -1, -1); in setFilePermissionsForDb()
|
/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/base/services/tests/uiservicestests/src/com/android/server/slice/ |
D | SlicePermissionManagerTest.java | 25 import android.os.FileUtils; 69 assertTrue(FileUtils.deleteContentsAndDir(sliceDir)); in testGrant() 113 assertTrue(FileUtils.deleteContentsAndDir(sliceDir)); in testBackup() 145 assertTrue(FileUtils.deleteContentsAndDir(sliceDir)); in testInvalid()
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/ |
D | LastMileLogger.java | 19 import android.os.FileUtils; 120 FileUtils.stringToFile(mEventEnablePath, "1"); in enableTracing() 128 FileUtils.stringToFile(mEventEnablePath, "0"); in disableTracing()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/backup/utils/ |
D | FileUtilsTest.java | 64 FileUtils.createNewFile(mTemporaryFile); in testEnsureFileExists_fileDoesNotAlreadyExist_getsCreated() 74 FileUtils.createNewFile(mTemporaryFile); in testEnsureFileExists_fileAlreadyExists_doesNotErrorOut()
|
/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | StoragedUidIoStatsReaderTest.java | 24 import android.os.FileUtils; 75 FileUtils.deleteContents(mTestDir); in tearDown() 76 FileUtils.deleteContents(mRoot); in tearDown()
|
/frameworks/base/core/java/com/android/internal/content/ |
D | FileSystemProvider.java | 33 import android.os.FileUtils; 128 return FileUtils.contains(parent, doc); in isChildDocument() 218 if (!FileUtils.contains(parent, doc)) { in findDocumentPath() 223 while (doc != null && FileUtils.contains(parent, doc)) { in findDocumentPath() 235 displayName = FileUtils.buildValidFatFilename(displayName); in createDocument() 242 final File file = FileUtils.buildUniqueFile(parent, mimeType, displayName); in createDocument() 270 displayName = FileUtils.buildValidFatFilename(displayName); in renameDocument() 274 final File after = FileUtils.buildUniqueFile(before.getParentFile(), displayName); in renameDocument() 332 FileUtils.deleteContents(file); in deleteDocument() 389 for (File file : FileUtils.listFilesOrEmpty(parent)) { in queryChildDocuments()
|
/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/packagemanagertests/src/android/content/pm/ |
D | KernelPackageMappingTests.java | 22 import android.os.FileUtils; 71 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() 348 String log = FileUtils.readTextFile(file, maxSize, "[[TRUNCATED]]\n"); in addAuditErrorsToDropBox() 373 String log = FileUtils.readTextFile(file, maxSize, "[[TRUNCATED]]\n"); in addFsckErrorsToDropBoxAndLogFsStat() 416 metricsStr = FileUtils.readTextFile(metricsFile, 0, null); in logSystemServerShutdownTimeMetrics() 528 lines = FileUtils.readTextFile(f, -maxReadSize, null); in logFsShutdownTime()
|