Home
last modified time | relevance | path

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

123456789

/packages/providers/MediaProvider/
Dmediaproviderutils.sh70 dir=$(pwd)
72 dir=$1
76 if [ -f "$dir/external.db" ]; then
77 rm "$dir/external.db"
79 if [ -f "$dir/external.db-wal" ]; then
80 rm "$dir/external.db-wal"
83 adb pull /data/user/0/$package/databases/external.db $dir/external.db
84 adb pull /data/user/0/$package/databases/external.db-wal "$dir/external.db-wal"
86 sqlite3 $dir/external.db "drop trigger files_insert"
87 sqlite3 $dir/external.db "drop trigger files_update"
[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.cpp80 unique_ptr<DIR, decltype(&closedir)> dir(opendir(TRAIN_INFO_DIR), closedir); in findTrainInfoFileNameLocked() local
81 if (dir == NULL) { in findTrainInfoFileNameLocked()
86 while ((de = readdir(dir.get()))) { in findTrainInfoFileNameLocked()
440 unique_ptr<DIR, decltype(&closedir)> dir(opendir(TRAIN_INFO_DIR), closedir); in readAllTrainInfo() local
441 if (dir == NULL) { in readAllTrainInfo()
447 while ((de = readdir(dir.get()))) { in readAllTrainInfo()
472 unique_ptr<DIR, decltype(&closedir)> dir(opendir(path), closedir); in deleteAllFiles() local
473 if (dir == NULL) { in deleteAllFiles()
479 while ((de = readdir(dir.get()))) { in deleteAllFiles()
487 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/Bluetooth/system/
DAndroid.mk1 LOCAL_PATH := $(call my-dir)
88 …$(call intermediates-dir-for,PACKAGING,bluetooth_cert_src_and_bin,HOST)/bluetooth_cert_src_and_bin…
106 …-C $(dir $(PRIVATE_host_python_hci_packets_library)) -f $(PRIVATE_host_python_hci_packets_library)…
126 …$(call intermediates-dir-for,PACKAGING,bluetooth_cert_tests_py_package,HOST)/bluetooth_cert_tests.…
134 @rm -rf $(dir $@)bluetooth_cert_tests
135 @mkdir -p $(dir $@)bluetooth_cert_tests
136 $(hide) unzip -o -q $(PRIVATE_cert_src_and_bin_zip) -d $(dir $@)bluetooth_cert_tests
137 $(hide) unzip -o -q $(PRIVATE_facade_generated_py_zip) -d $(dir $@)bluetooth_cert_tests
139 $(hide) for f in `find $(dir $@)bluetooth_cert_tests -type d -name "*" \
143 $(hide) $(SOONG_ZIP) -d -o $@ -C $(dir $@)bluetooth_cert_tests -D $(dir $@)bluetooth_cert_tests \
/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.py67 for dir in fileDirs:
68 type = dir.split('-')[0]
69 for file in os.listdir(os.path.join(resDir, dir)):
70 filePath = os.path.abspath(os.path.join(resDir, dir, file))
74 ResourceLocation(os.path.join(resDir, dir, file))))
75 if dir.startswith("layout"):
76 for resource in get_ids_from_layout_file(os.path.join(resDir, dir, file)):
78 for dir in valuesDirs:
79 for file in os.listdir(os.path.join(resDir, dir)):
80 filePath = os.path.abspath(os.path.join(resDir, dir, file))
[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/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 …]
DIdleServiceTest.java107 final File dir = Environment.getExternalStorageDirectory(); in testPruneThumbnails() local
120 final File a = touch(buildPath(dir, DIRECTORY_PICTURES, ".thumbnails", "1234567.jpg")); in testPruneThumbnails()
121 final File b = touch(buildPath(dir, DIRECTORY_MOVIES, ".thumbnails", "7654321.jpg")); in testPruneThumbnails()
122 final File c = touch(buildPath(dir, DIRECTORY_PICTURES, ".thumbnails", id + ".jpg")); in testPruneThumbnails()
123 final File d = touch(buildPath(dir, DIRECTORY_PICTURES, ".thumbnails", "random.bin")); in testPruneThumbnails()
124 final File e = touch(buildPath(dir, DIRECTORY_PICTURES, ".thumbnails", ".nomedia")); in testPruneThumbnails()
136 final File uuidFile = buildPath(dir, Environment.DIRECTORY_PICTURES, in testPruneThumbnails()
216 final File dir = Environment.getExternalStoragePublicDirectory( in testDetectSpecialFormat() local
222 values.put(RELATIVE_PATH, dir.getName()); in testDetectSpecialFormat()
228 final File file = new File(dir, fileName); in testDetectSpecialFormat()
/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/providers/MediaProvider/src/com/android/providers/media/scan/
DModernMediaScanner.java306 public void onDirectoryDirty(@NonNull File dir) { in onDirectoryDirty() argument
307 requireNonNull(dir); in onDirectoryDirty()
309 dir = dir.getCanonicalFile(); in onDirectoryDirty()
311 Log.e(TAG, "Couldn't canonicalize directory" + dir, e); in onDirectoryDirty()
316 mPendingCleanDirectories.remove(dir.getPath()); in onDirectoryDirty()
317 FileUtils.setDirectoryDirty(dir, /* isDirty */ true); in onDirectoryDirty()
504 for (String dir : mExcludeDirs) { in buildSqlSelectionArgs()
505 addEscapedAndExpandedPath(dir, escapedPaths); in buildSqlSelectionArgs()
642 private void acquireDirectoryLock(@NonNull Path dir) { in acquireDirectoryLock() argument
646 lock = mDirectoryLocks.get(dir); in acquireDirectoryLock()
[all …]
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/opp/
DBluetoothOppNotificationTest.java87 int dir = BluetoothShare.DIRECTION_INBOUND; in updateActiveNotification() local
104 timestamp, dir, id, total, current, null, null, confirmation, destination, status in updateActiveNotification()
107 timestamp + 10L, dir, id, total, current, null, null, confirmationHandoverInitiated, in updateActiveNotification()
131 int dir = BluetoothShare.DIRECTION_OUTBOUND; in updateCompletedNotification_withOutBoundShare_showsNoti() local
146 timestamp, dir, id, total, current, null, null, confirmation, destination, status in updateCompletedNotification_withOutBoundShare_showsNoti()
149 timestamp + 10L, dir, id, total, current, null, null, confirmation, in updateCompletedNotification_withOutBoundShare_showsNoti()
170 int dir = BluetoothShare.DIRECTION_INBOUND; in updateCompletedNotification_withInBoundShare_showsNoti() local
185 timestamp, dir, id, total, current, null, null, confirmation, destination, status in updateCompletedNotification_withInBoundShare_showsNoti()
188 timestamp + 10L, dir, id, total, current, null, null, confirmation, in updateCompletedNotification_withInBoundShare_showsNoti()
207 int dir = BluetoothShare.DIRECTION_INBOUND; in updateIncomingFileConfirmationNotification() local
[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/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/services/Car/tests/BugReportApp/src/com/android/car/bugreport/
DFileUtils.java49 File dir = new File(context.getDataDir(), PENDING_DIR); in getPendingDir() local
50 dir.mkdirs(); in getPendingDir()
51 return dir; in getPendingDir()
61 File dir = new File(context.getDataDir(), TEMP_DIR + "/" + timestamp); in getTempDir() local
62 dir.mkdirs(); in getTempDir()
63 return dir; in getTempDir()
/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/Bluetooth/system/gd/rust/packets/
Dbuild.rs22 Ok(dir) => PathBuf::from(dir), in main()
42 Ok(dir) => PathBuf::from(dir).join("bt/gd"), in generate_packets()
52 Ok(dir) => PathBuf::from(dir).join("bin").join("bluetooth_packetgen"), in generate_packets()
/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/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/modules/common/tools/
Dfinalize_sdk.py73 for dir in os.listdir('prebuilts/module_sdk/'):
74 if module.lower() in dir.lower():
76 fail('Multiple target dirs matched "%s": %s' % (module, (target_dir, dir)))
77 target_dir = dir
140 dir = dir_for_sdk(f.name, args.finalize_sdk) variable
141 target_dir = repo.joinpath(dir)
152 created_dirs[repo].add(dir)
/packages/services/Car/car_product/sepolicy/private/
Dcarservice_app.te67 allow carservice_app system_app_data_file:dir create_dir_perms;
70 allow carservice_app system_car_data_file:dir create_dir_perms;
86 allow carservice_app sysfs:dir { open read search };
87 allow carservice_app sysfs_fs_ext4_features:dir { open read search};
88 allow carservice_app sysfs_fs_f2fs:dir { open read search };
119 allow carservice_app gpu_device:dir r_dir_perms;
/packages/modules/AdServices/sdksandbox/tests/testutils/src/android/app/sdksandbox/testutils/
DSdkSandboxStorageManagerUtility.java90 for (String dir : nonSdkDirectories) { in getInternalStorageDirInfoForTest()
92 dir.equals(SdkSandboxStorageManager.SubDirectories.SHARED_DIR) in getInternalStorageDirInfoForTest()
93 ? dir in getInternalStorageDirInfoForTest()
94 : dir + '#' + dir; in getInternalStorageDirInfoForTest()

123456789