/frameworks/base/core/tests/coretests/src/android/os/ |
D | FileUtilsTest.java | 60 FileUtils.copyFile(mTestFile, mCopyFile); in testCopyFile() 62 assertEquals(TEST_DATA, FileUtils.readTextFile(mCopyFile, 0, null)); in testCopyFile() 69 …FileUtils.copyToFile(new ByteArrayInputStream(s.getBytes()), mCopyFile); assertTrue(mCopyFi… in testCopyToFile() 70 assertEquals(s, FileUtils.readTextFile(mCopyFile, 0, null)); in testCopyToFile() 75 assertTrue(FileUtils.isFilenameSafe(new File("foobar"))); in testIsFilenameSafe() 76 assertTrue(FileUtils.isFilenameSafe(new File("a_b-c=d.e/0,1+23"))); in testIsFilenameSafe() 77 assertFalse(FileUtils.isFilenameSafe(new File("foo*bar"))); in testIsFilenameSafe() 78 assertFalse(FileUtils.isFilenameSafe(new File("foo\nbar"))); in testIsFilenameSafe() 83 assertEquals(TEST_DATA, FileUtils.readTextFile(mTestFile, 0, null)); in testReadTextFile() 85 assertEquals("ABCDE", FileUtils.readTextFile(mTestFile, 5, null)); in testReadTextFile() [all …]
|
D | BinderThreadPriorityTest.java | 100 String cgroup = FileUtils.readTextFile(new File(fn), 1024, null); in getSchedulerGroup()
|
/frameworks/base/core/java/android/util/ |
D | AtomicFile.java | 19 import android.os.FileUtils; 108 FileUtils.setPermissions( in startWrite() 110 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH, in startWrite() 129 FileUtils.sync(str); in finishWrite() 146 FileUtils.sync(str); in failWrite() 163 FileUtils.sync(fos); in truncate()
|
/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/services/tests/servicestests/src/com/android/server/ |
D | MountServiceTests.java | 22 import android.os.FileUtils; 129 FileUtils.setPermissions(outFile.getPath(), FileUtils.S_IRWXU | FileUtils.S_IRWXG in copyRawToFile() 130 | FileUtils.S_IRWXO, -1, -1); in copyRawToFile() 131 assertTrue(FileUtils.copyToFile(is, outFile)); in copyRawToFile() 132 FileUtils.setPermissions(outFile.getPath(), FileUtils.S_IRWXU | FileUtils.S_IRWXG in copyRawToFile() 133 | 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; 97 FileUtils.sync(fos); in generateNewKey() 99 FileUtils.setPermissions(keyFile.getName(), (FileUtils.S_IRUSR | FileUtils.S_IWUSR), in generateNewKey()
|
/frameworks/base/core/java/com/android/internal/content/ |
D | PackageHelper.java | 19 import android.os.FileUtils; 247 FileUtils.sync(fstr); in extractPublicFiles() 249 FileUtils.setPermissions(publicZipFile.getAbsolutePath(), FileUtils.S_IRUSR in extractPublicFiles() 250 | FileUtils.S_IWUSR | FileUtils.S_IRGRP | FileUtils.S_IROTH, -1, -1); in extractPublicFiles()
|
/frameworks/base/core/tests/coretests/src/android/os/storage/ |
D | StorageManagerBaseTest.java | 27 import android.os.FileUtils; 237 FileUtils.setPermissions(outFile.getPath(), FileUtils.S_IRWXU | FileUtils.S_IRWXG in copyRawToFile() 238 | FileUtils.S_IRWXO, -1, -1); in copyRawToFile() 239 assertTrue(FileUtils.copyToFile(is, outFile)); in copyRawToFile() 240 FileUtils.setPermissions(outFile.getPath(), FileUtils.S_IRWXU | FileUtils.S_IRWXG in copyRawToFile() 241 | FileUtils.S_IRWXO, -1, -1); in copyRawToFile()
|
/frameworks/base/services/java/com/android/server/usb/ |
D | UsbDebuggingManager.java | 27 import android.os.FileUtils; 274 FileUtils.setPermissions(keyFile.toString(), in writeKey() 275 FileUtils.S_IRUSR | FileUtils.S_IWUSR | in writeKey() 276 FileUtils.S_IRGRP, -1, -1); in writeKey() 313 pw.println(FileUtils.readTextFile(new File("/data/misc/adb/adb_keys"), 0, null)); in dump() 319 pw.println(FileUtils.readTextFile(new File("/adb_keys"), 0, null)); in dump()
|
D | UsbDeviceManager.java | 33 import android.os.FileUtils; 249 FileUtils.stringToFile(RNDIS_ETH_ADDR_PATH, addrString); in initRndisAddress() 347 String state = FileUtils.readTextFile(new File(STATE_PATH), 0, null).trim(); in UsbHandler() 760 + FileUtils.readTextFile(new File(STATE_PATH), 0, null).trim()); in dump() 762 + FileUtils.readTextFile(new File(FUNCTIONS_PATH), 0, null).trim()); in dump() 764 + FileUtils.readTextFile(new File(MASS_STORAGE_FILE_PATH), 0, null).trim()); in dump() 800 FileUtils.stringToFile(MASS_STORAGE_FILE_PATH, path); in setMassStorageBackingFile()
|
/frameworks/base/test-runner/src/android/test/ |
D | RenamingDelegatingContext.java | 26 import android.os.FileUtils; 236 FileUtils.setPermissions( in getCacheDir() 238 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH, in getCacheDir()
|
/frameworks/base/core/java/android/app/ |
D | ContextImpl.java | 83 import android.os.FileUtils; 710 FileUtils.setPermissions( in openFileOutput() 712 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH, in openFileOutput() 736 FileUtils.setPermissions( in getFilesDir() 738 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH, in getFilesDir() 799 FileUtils.setPermissions( in getCacheDir() 801 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH, in getCacheDir() 1820 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH); in getDir() 1923 int perms = FileUtils.S_IRUSR|FileUtils.S_IWUSR in setFilePermissionsFromMode() 1924 |FileUtils.S_IRGRP|FileUtils.S_IWGRP in setFilePermissionsFromMode() [all …]
|
D | SharedPreferencesImpl.java | 20 import android.os.FileUtils; 550 FileUtils.setPermissions( in createFileOutputStream() 552 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH, in createFileOutputStream() 597 FileUtils.sync(str); in writeToFile()
|
/frameworks/base/services/java/com/android/server/ |
D | BootReceiver.java | 27 import android.os.FileUtils; 107 .append(FileUtils.readTextFile(new File("/proc/version"), 1024, "...\n")) in logBootEvents() 175 db.addText(tag, headers + FileUtils.readTextFile(file, maxSize, "[[TRUNCATED]]\n")); in addFileToDropBox()
|
D | CertBlacklister.java | 23 import android.os.FileUtils; 93 FileUtils.sync(out); in writeBlacklist()
|
D | DiskStatsService.java | 22 import android.os.FileUtils;
|
D | WallpaperManagerService.java | 46 import android.os.FileUtils; 746 FileUtils.setPermissions( in updateWallpaperBitmapLocked() 748 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH, in updateWallpaperBitmapLocked() 1250 FileUtils.sync(fos); in restoreNamedResourceLocked()
|
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/ |
D | SettingsBackupAgent.java | 28 import android.os.FileUtils; 337 FileUtils.setPermissions(FILE_WIFI_SUPPLICANT, in run() 338 FileUtils.S_IRUSR | FileUtils.S_IWUSR | in run() 339 FileUtils.S_IRGRP | FileUtils.S_IWGRP, in run() 507 FileUtils.setPermissions(FILE_WIFI_SUPPLICANT, in onRestoreFile() 508 FileUtils.S_IRUSR | FileUtils.S_IWUSR | in onRestoreFile() 509 FileUtils.S_IRGRP | FileUtils.S_IWGRP, in onRestoreFile()
|
/frameworks/base/services/java/com/android/server/pm/ |
D | UserManagerService.java | 34 import android.os.FileUtils; 166 FileUtils.setPermissions(mUsersDir.toString(), in UserManagerService() 167 FileUtils.S_IRWXU|FileUtils.S_IRWXG in UserManagerService() 168 |FileUtils.S_IROTH|FileUtils.S_IXOTH, in UserManagerService() 378 FileUtils.setPermissions( in writeBitmapLocked() 380 FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH, in writeBitmapLocked()
|
D | Settings.java | 50 import android.os.FileUtils; 181 FileUtils.setPermissions(mSystemDir.toString(), in Settings() 182 FileUtils.S_IRWXU|FileUtils.S_IRWXG in Settings() 183 |FileUtils.S_IROTH|FileUtils.S_IXOTH, in Settings() 1081 FileUtils.sync(fstr); in writePackageRestrictionsLPr() 1087 FileUtils.setPermissions(userPackagesStateFile.toString(), in writePackageRestrictionsLPr() 1088 FileUtils.S_IRUSR|FileUtils.S_IWUSR in writePackageRestrictionsLPr() 1089 |FileUtils.S_IRGRP|FileUtils.S_IWGRP, in writePackageRestrictionsLPr() 1326 FileUtils.sync(fstr); in writeLPr() 1332 FileUtils.setPermissions(mSettingsFilename.toString(), in writeLPr() [all …]
|
/frameworks/base/core/java/android/speech/tts/ |
D | FileSynthesisCallback.java | 19 import android.os.FileUtils; 92 FileUtils.setPermissions(mFileName.getAbsolutePath(), 0666, -1, -1); //-rw-rw-rw in closeFileAndWidenPermissions()
|
/frameworks/base/core/java/com/android/internal/util/ |
D | FileRotator.java | 19 import android.os.FileUtils; 380 FileUtils.sync(fos); in writeFile()
|
/frameworks/base/core/java/android/os/ |
D | FileUtils.java | 36 public class FileUtils { class
|
/frameworks/base/core/tests/coretests/src/android/content/pm/ |
D | PackageManagerTests.java | 35 import android.os.FileUtils; 295 FileUtils.setPermissions(outFile.getPath(), in getInstallablePackage() 296 FileUtils.S_IRWXU | FileUtils.S_IRWXG | FileUtils.S_IRWXO, in getInstallablePackage() 298 assertTrue(FileUtils.copyToFile(is, outFile)); in getInstallablePackage() 299 FileUtils.setPermissions(outFile.getPath(), in getInstallablePackage() 300 FileUtils.S_IRWXU | FileUtils.S_IRWXG | FileUtils.S_IRWXO, in getInstallablePackage()
|