Home
last modified time | relevance | path

Searched refs:dir (Results 1 – 25 of 252) sorted by relevance

1234567891011

/packages/providers/MediaProvider/
Dmediaproviderutils.sh69 dir=$(get-dir $1)
72 if [ -f "$dir/external.db" ]; then
73 rm "$dir/external.db"
75 if [ -f "$dir/external.db-wal" ]; then
76 rm "$dir/external.db-wal"
79 adb pull /data/user/0/$package/databases/external.db $dir/external.db
80 adb pull /data/user/0/$package/databases/external.db-wal "$dir/external.db-wal"
82 sqlite3 $dir/external.db "drop trigger files_insert"
83 sqlite3 $dir/external.db "drop trigger files_update"
84 sqlite3 $dir/external.db "drop trigger files_delete"
[all …]
/packages/providers/ContactsProvider/
Dcontactsproviderutils.sh9 dir=$(get-dir $1)
12 if [ -f "$dir/$CONTACTS_DB" ]; then
13 rm "$dir/$CONTACTS_DB"
15 if [ -f "$dir/$CONTACTS_DB-wal" ]; then
16 rm "$dir/$CONTACTS_DB-wal"
18 adb pull /data/user/0/$package/databases/$CONTACTS_DB $dir/$CONTACTS_DB
19 adb pull /data/user/0/$package/databases/$CONTACTS_DB-wal $dir/$CONTACTS_DB-wal
22 function get-dir (){
25 dir=$(pwd)
27 dir=$1
[all …]
/packages/apps/TV/common/tests/robotests/src/com/android/tv/common/util/
DCommonUtilsTest.java46 File dir = new File(RuntimeEnvironment.application.getExternalFilesDir(null), "dir"); in deleteDirOrFile_Dir() local
47 assertThat(dir.mkdirs()).isTrue(); in deleteDirOrFile_Dir()
48 assertThat(new File(dir, "file").createNewFile()).isTrue(); in deleteDirOrFile_Dir()
49 assertThat(CommonUtils.deleteDirOrFile(dir)).isTrue(); in deleteDirOrFile_Dir()
50 assertThat(dir.exists()).isFalse(); in deleteDirOrFile_Dir()
55 File dir = new File(RuntimeEnvironment.application.getExternalFilesDir(null), "dir"); in deleteDirOrFile_unreadableDir() local
56 assertThat(dir.mkdirs()).isTrue(); in deleteDirOrFile_unreadableDir()
57 assertThat(new File(dir, "file").createNewFile()).isTrue(); in deleteDirOrFile_unreadableDir()
58 dir.setReadable(false); in deleteDirOrFile_unreadableDir()
61 assertThat(CommonUtils.deleteDirOrFile(dir)).isFalse(); in deleteDirOrFile_unreadableDir()
[all …]
/packages/providers/MediaProvider/tests/src/com/android/providers/media/scan/
DMediaScannerTest.java81 final File dir = Environment.getExternalStorageDirectory(); in testCorrectness() local
82 stage(R.raw.test_audio, new File(dir, "test.mp3")); in testCorrectness()
83 stage(R.raw.test_video, new File(dir, "test.mp4")); in testCorrectness()
84 stage(R.raw.test_image, new File(dir, "test.jpg")); in testCorrectness()
87 scanDirectory(mLegacy, dir, "legacy"); in testCorrectness()
88 scanDirectory(mModern, dir, "modern"); in testCorrectness()
145 final File dir = new File(Environment.getExternalStorageDirectory(), in testSpeed() local
148 stage(dir, 4, 3); in testSpeed()
152 FileUtils.deleteContents(dir); in testSpeed()
153 dir.delete(); in testSpeed()
[all …]
/packages/modules/Virtualization/authfs/src/
Dfusefs.rs63 ReadonlyDirectory { dir: InMemoryDir },
74 VerifiedNewDirectory { dir: RemoteDirEditor, attr: Attr },
80 AuthFsEntry::VerifiedNewDirectory { dir, .. } => { in expect_empty_deletable_directory()
81 if dir.number_of_entries() == 0 { in expect_empty_deletable_directory()
220 InodeState::new(AuthFsEntry::ReadonlyDirectory { dir: InMemoryDir::new() }), in new()
267 let dir = match current_dir_entry { in add_entry_at_ro_dir_by_path() localVariable
268 AuthFsEntry::ReadonlyDirectory { dir } => dir, in add_entry_at_ro_dir_by_path()
272 if let Some(existing_inode) = dir.lookup_inode(name.as_ref()) { in add_entry_at_ro_dir_by_path()
277 AuthFsEntry::ReadonlyDirectory { dir: InMemoryDir::new() }; in add_entry_at_ro_dir_by_path()
280 dir.add_dir(name.as_ref(), new_inode)?; in add_entry_at_ro_dir_by_path()
[all …]
/packages/modules/StatsD/statsd/src/storage/
DStorageManager.cpp78 unique_ptr<DIR, decltype(&closedir)> dir(opendir(TRAIN_INFO_DIR), closedir); in findTrainInfoFileNameLocked() local
79 if (dir == NULL) { in findTrainInfoFileNameLocked()
84 while ((de = readdir(dir.get()))) { in findTrainInfoFileNameLocked()
438 unique_ptr<DIR, decltype(&closedir)> dir(opendir(TRAIN_INFO_DIR), closedir); in readAllTrainInfo() local
439 if (dir == NULL) { in readAllTrainInfo()
445 while ((de = readdir(dir.get()))) { in readAllTrainInfo()
470 unique_ptr<DIR, decltype(&closedir)> dir(opendir(path), closedir); in deleteAllFiles() local
471 if (dir == NULL) { in deleteAllFiles()
477 while ((de = readdir(dir.get()))) { in deleteAllFiles()
485 unique_ptr<DIR, decltype(&closedir)> dir(opendir(path), closedir); in deleteSuffixedFiles() local
[all …]
/packages/services/BuiltInPrintService/src/com/android/bips/util/
DFileUtils.java57 public static boolean makeDirectory(File dir) { in makeDirectory() argument
59 Log.d(TAG, "Testing file " + dir + " exists=" + dir.exists() in makeDirectory()
60 + " isDirectory=" + dir.isDirectory()); in makeDirectory()
62 if (dir.exists()) { in makeDirectory()
63 return dir.isDirectory(); in makeDirectory()
65 return dir.mkdir(); in makeDirectory()
/packages/modules/AdServices/shared/libraries/device-side/java/com/android/adservices/shared/testing/common/
DFileHelper.java40 File dir = getAdServicesTestsOutputDir(); in writeFile() local
41 Path filePath = Paths.get(dir.getAbsolutePath(), filename); in writeFile()
68 File dir = new File(path); in getAdServicesTestsOutputDir() local
69 if (dir.exists()) { in getAdServicesTestsOutputDir()
70 return dir; in getAdServicesTestsOutputDir()
73 if (dir.mkdirs()) { in getAdServicesTestsOutputDir()
75 return dir; in getAdServicesTestsOutputDir()
/packages/modules/Bluetooth/system/
DAndroid.mk1 LOCAL_PATH := $(call my-dir)
89 …$(call intermediates-dir-for,PACKAGING,bluetooth_cert_src_and_bin,HOST)/bluetooth_cert_src_and_bin…
107 …-C $(dir $(PRIVATE_host_python_hci_packets_library)) -f $(PRIVATE_host_python_hci_packets_library)…
108 …-C $(dir $(PRIVATE_host_python_smp_packets_library)) -f $(PRIVATE_host_python_smp_packets_library)…
127 …$(call intermediates-dir-for,PACKAGING,bluetooth_cert_tests_py_package,HOST)/bluetooth_cert_tests.…
135 @rm -rf $(dir $@)bluetooth_cert_tests
136 @mkdir -p $(dir $@)bluetooth_cert_tests
137 $(hide) unzip -o -q $(PRIVATE_cert_src_and_bin_zip) -d $(dir $@)bluetooth_cert_tests
138 $(hide) unzip -o -q $(PRIVATE_facade_generated_py_zip) -d $(dir $@)bluetooth_cert_tests
140 $(hide) for f in `find $(dir $@)bluetooth_cert_tests -type d -name "*" \
[all …]
/packages/modules/Virtualization/zipfuse/testdata/
DREADME3 $ mkdir dir
4 $ base64 /dev/urandom | head -c 100000 > dir/file1
5 $ base64 /dev/urandom | head -c 100000 > dir/file2
6 $ soong_zip -o test.zip -D dir
12 -rw------- 2.0 unx 100000 bl defN 08-Jan-01 00:00 dir/file1
13 -rw------- 2.0 unx 100000 bl defN 08-Jan-01 00:00 dir/file2
/packages/modules/Connectivity/netbpfload/
DNetBpfLoad.cpp73 .dir = "/apex/com.android.tethering/etc/bpf/",
79 .dir = "/apex/com.android.tethering/etc/bpf/netd_shared/",
85 .dir = "/apex/com.android.tethering/etc/bpf/netd_readonly/",
90 .dir = "/apex/com.android.tethering/etc/bpf/net_shared/",
95 .dir = "/apex/com.android.tethering/etc/bpf/net_private/",
102 DIR* dir; in loadAllElfObjects() local
105 if ((dir = opendir(location.dir)) != NULL) { in loadAllElfObjects()
106 while ((ent = readdir(dir)) != NULL) { in loadAllElfObjects()
110 string progPath(location.dir); in loadAllElfObjects()
122 closedir(dir); in loadAllElfObjects()
[all …]
/packages/inputmethods/LatinIME/native/jni/src/dictionary/utils/
Dfile_utils.cpp46 DIR *const dir = opendir(dirPath); in existsDir() local
47 if (dir == NULL) { in existsDir()
50 closedir(dir); in existsDir()
61 DIR *const dir = opendir(dirPath); in removeDirAndFiles() local
62 if (dir == NULL) { in removeDirAndFiles()
67 while ((dirent = readdir(dir)) != NULL) { in removeDirAndFiles()
79 closedir(dir); in removeDirAndFiles()
83 closedir(dir); in removeDirAndFiles()
/packages/apps/Car/systemlibs/tools/rro/
Dresource_utils.py69 for dir in fileDirs:
70 type = dir.split('-')[0]
71 for file in os.listdir(os.path.join(resDir, dir)):
72 filePath = os.path.abspath(os.path.join(resDir, dir, file))
76 ResourceLocation(os.path.join(resDir, dir, file))))
77 if dir.startswith("layout"):
78 for resource in get_ids_from_layout_file(os.path.join(resDir, dir, file)):
80 for dir in valuesDirs:
81 for file in os.listdir(os.path.join(resDir, dir)):
82 filePath = os.path.abspath(os.path.join(resDir, dir, file))
[all …]
/packages/providers/MediaProvider/tests/client/src/com/android/providers/media/client/
DDownloadProviderTest.java105 for (String dir: otherPackageDirsOnSameVolume) { in createOtherPackageExternalFilesDir()
106 otherPackageDirs.add(new File(dir)); in createOtherPackageExternalFilesDir()
107 final String otherPackageExternalFilesDir = dir + "/files"; in createOtherPackageExternalFilesDir()
128 for (File dir: otherPackageDirs) { in deleteOtherPackageExternalFiles()
129 executeShellCommand("rm -r " + dir.getAbsolutePath()); in deleteOtherPackageExternalFiles()
152 private static void pollForDirectoryToBeCreated(File dir) throws Exception { in pollForDirectoryToBeCreated() argument
154 () -> dir.exists(), in pollForDirectoryToBeCreated()
155 "Timed out while waiting for dir " + dir + " to be created"); in pollForDirectoryToBeCreated() local
/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/
DFileSystemPermissionTest.java509 File dir = new File("/sys/class/xt_idletimer"); in testIdletimerDirectoryExistsAndSane() local
510 assertTrue(dir.isDirectory()); in testIdletimerDirectoryExistsAndSane()
511 assertFalse(dir.canWrite()); in testIdletimerDirectoryExistsAndSane()
512 assertTrue(dir.canExecute()); in testIdletimerDirectoryExistsAndSane()
514 assertFileOwnedBy(dir, "root"); in testIdletimerDirectoryExistsAndSane()
515 assertFileOwnedByGroup(dir, "root"); in testIdletimerDirectoryExistsAndSane()
848 for (String dir : OTHER_RANDOM_DIRECTORIES) { in testOtherRandomDirectoriesNotWritable()
849 File start = new File(dir); in testOtherRandomDirectoriesNotWritable()
865 private static void tryToReadFromAllIn(File dir, ExecutorService executor) throws IOException { in tryToReadFromAllIn() argument
866 assertTrue(dir.isDirectory()); in tryToReadFromAllIn()
[all …]
/packages/modules/OnDevicePersonalization/tests/servicetests/src/com/android/ondevicepersonalization/services/data/vendor/
DOnDevicePersonalizationVendorDataDaoTest.java114 File dir = new File(OnDevicePersonalizationVendorDataDao.getFileDir( in testBatchInsert() local
117 assertTrue(dir.isDirectory()); in testBatchInsert()
118 assertTrue(new File(dir, "large_" + timestamp).exists()); in testBatchInsert()
188 File dir = new File(OnDevicePersonalizationVendorDataDao.getFileDir( in testDeleteVendor() local
196 assertTrue(dir.isDirectory()); in testDeleteVendor()
205 assertFalse(dir.exists()); in testDeleteVendor()
283 File dir = new File(OnDevicePersonalizationVendorDataDao.getFileDir( in testDeleteVendorTables() local
295 assertEquals(3, dir.listFiles().length); in testDeleteVendorTables()
305 assertEquals(9, dir.listFiles().length); in testDeleteVendorTables()
309 assertEquals(3, dir.listFiles().length); in testDeleteVendorTables()
[all …]
/packages/providers/MediaProvider/tests/src/com/android/providers/media/
DMediaDocumentsProviderTest.java108 for (String dir : new String[] { in testSimple()
113 assertProbe(resolver, "document", dir, "children"); in testSimple()
275 final File dir = new File(context.getExternalMediaDirs()[0], "test_" + System.nanoTime()); in stageTestMedia() local
276 dir.mkdirs(); in stageTestMedia()
277 FileUtils.deleteContents(dir); in stageTestMedia()
279 stage(R.raw.test_audio, new File(dir, "audio.mp3")); in stageTestMedia()
280 stage(R.raw.test_video, new File(dir, "video.mp4")); in stageTestMedia()
281 stage(R.raw.test_image, new File(dir, "image.jpg")); in stageTestMedia()
282 stage(R.raw.test_m3u, new File(dir, "playlist.m3u")); in stageTestMedia()
283 stage(R.raw.test_srt, new File(dir, "subtitle.srt")); in stageTestMedia()
[all …]
/packages/providers/MediaProvider/tests/src/com/android/providers/media/util/
DSpecialFormatDetectorTest.java65 final File dir = Environment.getExternalStoragePublicDirectory( in testDetect_gif() local
67 final File file = stage(R.raw.test_gif, new File(dir, TAG + System.nanoTime() + ".jpg")); in testDetect_gif()
90 final File dir = Environment.getExternalStoragePublicDirectory( in testDetect_motionPhoto() local
92 final File file = stage(R.raw.test_motion_photo, new File(dir, TAG + System.nanoTime() + in testDetect_motionPhoto()
116 final File dir = Environment.getExternalStoragePublicDirectory( in testDetect_animatedWebp() local
118 final File file = stage(R.raw.test_animated_webp, new File(dir, TAG + System.nanoTime() + in testDetect_animatedWebp()
142 final File dir = Environment.getExternalStoragePublicDirectory( in testDetect_nonAnimatedWebp() local
144 final File file = stage(R.raw.test_non_animated_webp, new File(dir, TAG + System.nanoTime() in testDetect_nonAnimatedWebp()
167 final File dir = Environment.getExternalStoragePublicDirectory( in testDetect_notSpecialFormat() local
169 final File file = stage(R.raw.test_image, new File(dir, TAG + System.nanoTime() + ".jpg")); in testDetect_notSpecialFormat()
/packages/services/Car/service/src/com/android/car/telemetry/util/
DIoUtils.java63 @NonNull File dir, @NonNull String fileName, @NonNull PersistableBundle bundle) in writeBundle()
65 writeBundle(new File(dir, fileName), bundle); in writeBundle()
98 @NonNull File dir, @NonNull String fileName, @NonNull MessageLite proto) in writeProto()
100 writeProto(new File(dir, fileName), proto); in writeProto()
166 for (File dir : dirs) { in deleteOldFiles()
167 File[] files = dir.listFiles(); in deleteOldFiles()
169 Slogf.i(CarLog.TAG_TELEMETRY, "Skip deleting the empty dir %s", dir.getName()); in deleteOldFiles()
/packages/modules/GeoTZ/common/host/main/java/com/android/timezone/location/common/
DLicenseSupport.java68 public void checkLicensePresentInDir(File dir) throws IOException { in checkLicensePresentInDir() argument
69 checkIsDir(dir); in checkLicensePresentInDir()
70 File licenseFile = new File(dir, LICENSE_FILE_NAME); in checkLicensePresentInDir()
133 private static void checkIsDir(File dir) { in checkIsDir() argument
134 if (!dir.isDirectory()) { in checkIsDir()
135 throw new IllegalArgumentException(dir + " is not a directory."); in checkIsDir()
/packages/services/Car/tests/BugReportApp/src/com/android/car/bugreport/
DFileUtils.java54 File dir = new File(context.getDataDir(), PENDING_DIR); in getPendingDir() local
55 dir.mkdirs(); in getPendingDir()
56 return dir; in getPendingDir()
66 File dir = new File(context.getDataDir(), TEMP_DIR + "/" + timestamp); in getTempDir() local
67 dir.mkdirs(); in getTempDir()
68 return dir; in getTempDir()
/packages/inputmethods/LatinIME/tools/dicttool/compat/android/test/
DAndroidTestCase.java32 final File dir = Test.TEST_TMP_DIR; in getCacheDir() local
33 if (!dir.isDirectory()) { in getCacheDir()
34 dir.mkdirs(); in getCacheDir()
36 return dir; in getCacheDir()
/packages/providers/MediaProvider/src/com/android/providers/media/util/
DFileUtils.java163 public static boolean deleteOlderFiles(File dir, int minCount, long minAgeMs) { in deleteOlderFiles() argument
168 final File[] files = dir.listFiles(); in deleteOlderFiles()
337 for (File dir : dirs) { in contains()
338 if (contains(dir, file)) { in contains()
347 for (File dir : dirs) { in contains()
348 if (contains(dir, file)) { in contains()
365 public static boolean contains(File dir, File file) { in contains() argument
366 if (dir == null || file == null) return false; in contains()
367 return contains(dir.getAbsolutePath(), file.getAbsolutePath()); in contains()
442 public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) { in walkFileTreeContents()
[all …]
/packages/modules/ExtServices/java/tests/src/android/ext/services/common/
DAdServicesFilesCleanupBootCompleteReceiverTest.java221 File dir = mock(File.class); in testReceiverHandlesSecurityException() local
222 doReturn(true).when(dir).isDirectory(); in testReceiverHandlesSecurityException()
223 doReturn(new File[] { file1, file2, file3 }).when(dir).listFiles(); in testReceiverHandlesSecurityException()
226 mReceiver.deleteAdServicesFiles(dir); in testReceiverHandlesSecurityException()
289 File dir = mContext.getFilesDir(); in createFiles() local
291 createFile(name, dir); in createFiles()
329 Path dir = root.resolve(path); in createFile() local
330 Files.createDirectories(dir); in createFile()
331 return createFile(fileName, dir.toFile()); in createFile()
344 public FileVisitResult postVisitDirectory(Path dir, IOException exc) in deletePathRecursively()
[all …]
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/opp/
DBluetoothOppNotificationTest.java130 int dir = BluetoothShare.DIRECTION_INBOUND; in updateActiveNotification() local
155 dir, in updateActiveNotification()
168 dir, in updateActiveNotification()
211 int dir = BluetoothShare.DIRECTION_OUTBOUND; in updateCompletedNotification_withOutBoundShare_showsNoti() local
234 dir, in updateCompletedNotification_withOutBoundShare_showsNoti()
247 dir, in updateCompletedNotification_withOutBoundShare_showsNoti()
291 int dir = BluetoothShare.DIRECTION_INBOUND; in updateCompletedNotification_withInBoundShare_showsNoti() local
314 dir, in updateCompletedNotification_withInBoundShare_showsNoti()
327 dir, in updateCompletedNotification_withInBoundShare_showsNoti()
368 int dir = BluetoothShare.DIRECTION_INBOUND; in updateIncomingFileConfirmationNotification() local
[all …]

1234567891011