/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 | AtomicDirectory.java | 20 import android.os.FileUtils; 165 FileUtils.sync(destination); in closeWrite() 166 FileUtils.closeQuietly(destination); in closeWrite() 175 FileUtils.closeQuietly(destination); in failWrite() 240 FileUtils.setPermissions(mBaseDirectory.getPath(), in ensureBaseDirectory() 241 FileUtils.S_IRWXU | FileUtils.S_IRWXG | FileUtils.S_IXOTH, -1, -1); in ensureBaseDirectory() 281 return FileUtils.deleteContentsAndDir(directory); in deleteDirectory() 304 FileUtils.closeQuietly(fd); in syncDirectory()
|
/frameworks/base/core/java/android/util/ |
D | AtomicFile.java | 19 import android.os.FileUtils; 129 FileUtils.setPermissions(parent.getPath(), FileUtils.S_IRWXU | FileUtils.S_IRWXG in startWrite() 130 | FileUtils.S_IXOTH, -1, -1); in startWrite() 149 if (!FileUtils.sync(str)) { in finishWrite() 173 if (!FileUtils.sync(str)) { in failWrite() 192 FileUtils.sync(fos); in truncate()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | LastMileLoggerTest.java | 29 import com.android.server.wifi.util.FileUtils; 61 FileUtils.stringToFile(mTraceEnableFile.getPath(), "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/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/tests/servicestests/src/com/android/server/ |
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/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 | 33 import android.os.FileUtils; 57 if (FileUtils.contains(Environment.getRootDirectory(), codePath)) { in calculateBundledApkRoot() 59 } else if (FileUtils.contains(Environment.getOemDirectory(), codePath)) { in calculateBundledApkRoot() 61 } else if (FileUtils.contains(Environment.getVendorDirectory(), codePath)) { in calculateBundledApkRoot() 63 } else if (FileUtils.contains(Environment.getOdmDirectory(), codePath)) { in calculateBundledApkRoot() 65 } else if (FileUtils.contains(Environment.getProductDirectory(), codePath)) { in calculateBundledApkRoot() 67 } else if (FileUtils.contains(Environment.getSystemExtDirectory(), codePath)) { in calculateBundledApkRoot() 69 } else if (FileUtils.contains(Environment.getOdmDirectory(), codePath)) { in calculateBundledApkRoot() 71 } 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/core/java/android/content/pm/ |
D | PackagePartitions.java | 23 import android.os.FileUtils; 181 return FileUtils.contains(mFolder.getFile(), canonicalize(file)); in containsFile() 187 && FileUtils.contains(mPrivAppFolder.getFile(), canonicalize(scanFile)); in containsPrivApp() 193 && FileUtils.contains(mAppFolder.getFile(), canonicalize(scanFile)); in containsApp() 199 && FileUtils.contains(mOverlayFolder.getFile(), canonicalize(scanFile)); in containsOverlay()
|
/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; 444 int perms = FileUtils.S_IRUSR | FileUtils.S_IWUSR | FileUtils.S_IRGRP | FileUtils.S_IWGRP; in setFilePermissionsForDb() 445 FileUtils.setPermissions(dbPath, perms, -1, -1); in setFilePermissionsForDb()
|
/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/base/services/core/java/com/android/server/updates/ |
D | CertificateTransparencyLogInstallReceiver.java | 19 import android.os.FileUtils; 84 FileUtils.deleteContentsAndDir(newVersion); in install() 123 FileUtils.deleteContentsAndDir(newVersion); in install() 185 FileUtils.deleteContentsAndDir(f); in deleteOldLogDirectories()
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/ |
D | LastMileLogger.java | 21 import com.android.server.wifi.util.FileUtils; 120 FileUtils.stringToFile(mEventEnablePath, "1"); in enableTracing() 128 FileUtils.stringToFile(mEventEnablePath, "0"); in disableTracing()
|
/frameworks/base/core/java/com/android/internal/content/ |
D | FileSystemProvider.java | 35 import android.os.FileUtils; 133 return FileUtils.contains(parent, doc); in isChildDocument() 223 if (!FileUtils.contains(parent, doc)) { in findDocumentPath() 228 while (doc != null && FileUtils.contains(parent, doc)) { in findDocumentPath() 240 displayName = FileUtils.buildValidFatFilename(displayName); in createDocument() 247 final File file = FileUtils.buildUniqueFile(parent, mimeType, displayName); in createDocument() 275 displayName = FileUtils.buildValidFatFilename(displayName); in renameDocument() 279 final File after = FileUtils.buildUniqueFile(before.getParentFile(), displayName); in renameDocument() 337 FileUtils.deleteContents(file); in deleteDocument() 428 for (File file : FileUtils.listFilesOrEmpty(parent)) { in queryChildDocuments() [all …]
|
/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/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/tests/coretests/src/android/content/res/ |
D | ResourcesLocaleTest.java | 19 import android.os.FileUtils; 39 FileUtils.copyToFileOrThrow(is, path); in extractApkAndGetPath()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/net/watchlist/ |
D | WatchlistLoggingHandlerTests.java | 33 import android.os.FileUtils; 154 FileUtils.bytesToFile(fileDir + "/" + APK_A, APK_A_CONTENT.getBytes()); in setUp() 155 FileUtils.bytesToFile(fileDir + "/" + APK_B, APK_B_CONTENT.getBytes()); in setUp()
|
/frameworks/base/core/java/com/android/server/ |
D | BootReceiver.java | 27 import android.os.FileUtils; 159 return FileUtils.readTextFile(lastHeaderFile, 0, null); in getPreviousBootHeaders() 174 .append(FileUtils.readTextFile(new File("/proc/version"), 1024, "...\n")) in getCurrentBootHeaders() 184 FileUtils.stringToFile(lastHeaderFile, newHeaders); in getBootHeadersToLogAndUpdate() 325 String fileContents = FileUtils.readTextFile(file, maxSize, TAG_TRUNCATED); in addFileWithFootersToDropBox() 369 String log = FileUtils.readTextFile(file, maxSize, TAG_TRUNCATED); in addAuditErrorsToDropBox() 394 String log = FileUtils.readTextFile(file, maxSize, TAG_TRUNCATED); in addFsckErrorsToDropBoxAndLogFsStat() 458 metricsStr = FileUtils.readTextFile(metricsFile, 0, null); in logSystemServerShutdownTimeMetrics() 571 lines = FileUtils.readTextFile(f, -maxReadSize, null); in logFsShutdownTime()
|