Home
last modified time | relevance | path

Searched refs:FileUtils (Results 1 – 25 of 130) sorted by relevance

123456

/frameworks/base/core/tests/coretests/src/android/os/
DFileUtilsTest.java19 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/
DAtomicFile.java21 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()
DAtomicDirectory.java21 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/
DAtomicFile.java19 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/
DLastMileLoggerTest.java27 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/
DMountServiceTests.java22 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()
DEntropyMixerTest.java20 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/
DUpdateInstaller.java28 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/
DSystemKeyStore.java20 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/
DUserDataPreparer.java24 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()
DPackageAbiHelperImpl.java34 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/
DZramWriteback.java25 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()
DExtconStateObserver.java20 import android.os.FileUtils;
49 FileUtils.readTextFile(new File(statePath), 0, null).trim()); in parseStateFromFile()
/frameworks/base/core/tests/benchmarks/src/android/os/
DFileUtilsBenchmark.java19 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/
DUserDataPreparerTest.java27 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/
DSQLiteOpenHelper.java27 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/
DCertificateTransparencyLogInstallReceiver.java20 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/
DSlicePermissionManagerTest.java25 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/
DLastMileLogger.java19 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/
DFileUtilsTest.java64 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/
DStoragedUidIoStatsReaderTest.java24 import android.os.FileUtils;
75 FileUtils.deleteContents(mTestDir); in tearDown()
76 FileUtils.deleteContents(mRoot); in tearDown()
/frameworks/base/core/java/com/android/internal/content/
DFileSystemProvider.java33 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/
DBugreportReceiver.java31 import android.os.FileUtils;
79 FileUtils.deleteOlderFiles(bugreportFile.getParentFile(), minCount, minAge); in cleanupOldFiles()
/frameworks/base/core/tests/packagemanagertests/src/android/content/pm/
DKernelPackageMappingTests.java22 import android.os.FileUtils;
71 return FileUtils.readTextFile(file, 0, null).trim(); in getContent()
/frameworks/base/core/java/com/android/server/
DBootReceiver.java27 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()

123456