/frameworks/base/core/tests/coretests/src/android/os/ |
D | FileUtilsTest.java | 19 import static android.os.FileUtils.convertToModernFd; 20 import static android.os.FileUtils.roundStorageSize; 21 import static android.os.FileUtils.translateModeAccessToPosix; 22 import static android.os.FileUtils.translateModePfdToPosix; 23 import static android.os.FileUtils.translateModePosixToPfd; 24 import static android.os.FileUtils.translateModePosixToString; 25 import static android.os.FileUtils.translateModeStringToPosix; 56 import android.os.FileUtils.MemoryPipe; 110 FileUtils.deleteContents(mTarget); in setUp() 115 FileUtils.deleteContents(mDir); in tearDown() [all …]
|
/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | CpuScalingPolicyReaderTest.java | 21 import android.os.FileUtils; 40 FileUtils.deleteContents(testDir); in setup() 43 FileUtils.createDir(policy0); in setup() 44 FileUtils.stringToFile(new File(policy0, "related_cpus"), "0 2 7"); in setup() 45 FileUtils.stringToFile(new File(policy0, "scaling_available_frequencies"), "1234 9876"); in setup() 48 FileUtils.createDir(policy5); in setup() 49 FileUtils.stringToFile(new File(policy5, "related_cpus"), "3 6\n"); in setup() 50 FileUtils.stringToFile(new File(policy5, "scaling_available_frequencies"), "1234 5678\n"); in setup() 51 FileUtils.stringToFile(new File(policy5, "scaling_boost_frequencies"), "9998 9999\n"); in setup() 54 FileUtils.createDir(policy7); in setup() [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 | 24 import android.os.FileUtils; 156 FileUtils.setPermissions(parent.getPath(), FileUtils.S_IRWXU | FileUtils.S_IRWXG in startWrite() 157 | FileUtils.S_IXOTH, -1, -1); in startWrite() 176 if (!FileUtils.sync(str)) { in finishWrite() 199 if (!FileUtils.sync(str)) { in failWrite() 218 FileUtils.sync(fos); in truncate()
|
/frameworks/base/services/core/java/com/android/server/app/ |
D | GameManagerSettings.java | 20 import android.os.FileUtils; 84 FileUtils.setPermissions(mSystemDir.toString(), in GameManagerSettings() 85 FileUtils.S_IRWXU | FileUtils.S_IRWXG in GameManagerSettings() 86 | FileUtils.S_IROTH | FileUtils.S_IXOTH, in GameManagerSettings() 179 FileUtils.setPermissions(mSettingsFile.toString(), in writePersistentDataLocked() 180 FileUtils.S_IRUSR | FileUtils.S_IWUSR in writePersistentDataLocked() 181 | FileUtils.S_IRGRP | FileUtils.S_IWGRP, in writePersistentDataLocked()
|
/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; 97 FileUtils.sync(fos); in generateNewKey() 99 FileUtils.setPermissions(keyFile.getName(), (FileUtils.S_IRUSR | FileUtils.S_IWUSR), in generateNewKey()
|
/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/database/sqlite/ |
D | SQLiteOpenHelper.java | 27 import android.os.FileUtils; 438 int perms = FileUtils.S_IRUSR | FileUtils.S_IWUSR | FileUtils.S_IRGRP | FileUtils.S_IWGRP; in setFilePermissionsForDb() 439 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/tests/servicestests/src/com/android/server/net/watchlist/ |
D | FileHashCacheTests.java | 26 import android.os.FileUtils; 111 FileUtils.stringToFile(apkA, APK_A_CONTENT); in testFileHashCache_generic() 112 FileUtils.stringToFile(apkB, APK_B_CONTENT); in testFileHashCache_generic() 133 FileUtils.stringToFile(apkA, APK_A_ALT_CONTENT); in testFileHashCache_generic()
|
/frameworks/base/core/java/android/content/pm/ |
D | PackagePartitions.java | 25 import android.os.FileUtils; 240 return FileUtils.contains(mFolder.getFile(), canonicalize(file)); in containsFile() 246 && FileUtils.contains(mPrivAppFolder.getFile(), canonicalize(scanFile)); in containsPrivApp() 252 && FileUtils.contains(mAppFolder.getFile(), canonicalize(scanFile)); in containsApp() 258 && FileUtils.contains(mOverlayFolder.getFile(), canonicalize(scanFile)); in containsOverlay()
|
/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/base/services/tests/mockingservicestests/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/java/com/android/internal/content/ |
D | FileSystemProvider.java | 35 import android.os.FileUtils; 143 return FileUtils.contains(parent, doc); in isChildDocument() 233 if (!FileUtils.contains(parent, doc)) { in findDocumentPath() 238 while (doc != null && FileUtils.contains(parent, doc)) { in findDocumentPath() 250 displayName = FileUtils.buildValidFatFilename(displayName); in createDocument() 257 final File file = FileUtils.buildUniqueFile(parent, mimeType, displayName); in createDocument() 284 displayName = FileUtils.buildValidFatFilename(displayName); in renameDocument() 288 final File after = FileUtils.buildUniqueFile(before.getParentFile(), displayName); in renameDocument() 356 FileUtils.deleteContents(file); in deleteDocument() 419 for (File file : FileUtils.listFilesOrEmpty(parent)) { in queryChildDocuments() [all …]
|
/frameworks/base/services/core/java/com/android/server/pm/ |
D | ResilientAtomicFile.java | 21 import android.os.FileUtils; 64 FileUtils.sync(str); in finalizeOutStream() 65 FileUtils.setPermissions(str.getFD(), mFileMode, -1, -1); in finalizeOutStream() 144 FileUtils.copy(mainInStream, reserveOutStream); in finishWrite()
|
D | ShortcutPackageItem.java | 23 import android.os.FileUtils; 272 int fileMode = FileUtils.S_IRWXU | FileUtils.S_IRWXG | FileUtils.S_IXOTH; in getResilientFile()
|
D | PackageAbiHelperImpl.java | 36 import android.os.FileUtils; 69 if (FileUtils.contains(Environment.getRootDirectory(), codePath)) { in calculateBundledApkRoot() 71 } else if (FileUtils.contains(Environment.getOemDirectory(), codePath)) { in calculateBundledApkRoot() 73 } else if (FileUtils.contains(Environment.getVendorDirectory(), codePath)) { in calculateBundledApkRoot() 75 } else if (FileUtils.contains(Environment.getOdmDirectory(), codePath)) { in calculateBundledApkRoot() 77 } else if (FileUtils.contains(Environment.getProductDirectory(), codePath)) { in calculateBundledApkRoot() 79 } else if (FileUtils.contains(Environment.getSystemExtDirectory(), codePath)) { in calculateBundledApkRoot() 81 } else if (FileUtils.contains(Environment.getOdmDirectory(), codePath)) { in calculateBundledApkRoot() 83 } else if (FileUtils.contains(Environment.getApexDirectory(), codePath)) { in calculateBundledApkRoot()
|
D | PackageManagerServiceUtils.java | 71 import android.os.FileUtils; 330 FileUtils.setPermissions( in logCriticalInfo() 332 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IROTH, in logCriticalInfo() 832 FileUtils.copy(fileIn, outputStream); in decompressFile() 1056 if (!FileUtils.isValidExtFilename(targetName)) { in copyFile() 1068 FileUtils.copy(source.getFD(), targetFd); in copyFile() 1364 if (!FileUtils.createDir(cacheBaseDir)) { in preparePackageParserCache() 1375 for (File cacheDir : FileUtils.listFilesOrEmpty(cacheBaseDir)) { in preparePackageParserCache() 1380 FileUtils.deleteContentsAndDir(cacheDir); in preparePackageParserCache() 1385 File cacheDir = FileUtils.createDir(cacheBaseDir, cacheName); in preparePackageParserCache() [all …]
|
/frameworks/base/services/permission/java/com/android/server/permission/access/util/ |
D | AtomicFileExtensions.kt | 19 import android.os.FileUtils in <lambda>() 55 FileUtils.copy(inputStream, outputStream) in writeWithReserveCopy()
|
/frameworks/base/services/core/java/com/android/server/graphics/fonts/ |
D | UpdatableFontDir.java | 25 import android.os.FileUtils; 192 FileUtils.deleteContentsAndDir(dir); in loadFontFileMap() 202 FileUtils.deleteContentsAndDir(dir); in loadFontFileMap() 275 FileUtils.deleteContents(mFilesDir); in loadFontFileMap() 387 FileUtils.copy(fd, out.getFD()); in installFontFile() 465 FileUtils.deleteContentsAndDir(newDir); in installFontFile() 516 FileUtils.deleteContentsAndDir(existingInfo.getRandomizedFontDir()); in addFileToMapIfSameOrNewer() 521 FileUtils.deleteContentsAndDir(fontFileInfo.getRandomizedFontDir()); in addFileToMapIfSameOrNewer() 722 FileUtils.deleteContents(filesDir); in deleteAllFiles()
|
/frameworks/base/services/tests/PackageManagerServiceTests/server/src/com/android/server/pm/ |
D | UserDataPreparerTest.java | 31 import android.os.FileUtils; 81 FileUtils.deleteContents(ctx.getCacheDir()); in setup() 159 assertEquals(Collections.singletonList(ceFile), Arrays.asList(FileUtils.listFilesOrEmpty( in testDestroyUserData_De_DoesNotDestroyCe() 186 assertEquals(Collections.emptyList(), Arrays.asList(FileUtils.listFilesOrEmpty( in testDestroyUserData_De() 208 assertEquals(Collections.emptyList(), Arrays.asList(FileUtils.listFilesOrEmpty( in testDestroyUserData_Ce()
|
/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()
|