Home
last modified time | relevance | path

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

12345678910

/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/
Dsqlite3.sh8 dir=$(pwd)
10 dir=$1
14 rm $dir/external.db
15 rm $dir/external.db-wal
17 adb pull /data/user/0/$package/databases/external.db $dir/external.db
18 adb pull /data/user/0/$package/databases/external.db-wal "$dir/external.db-wal"
20 sqlite3 $dir/external.db "drop trigger files_insert"
21 sqlite3 $dir/external.db "drop trigger files_update"
22 sqlite3 $dir/external.db "drop trigger files_delete"
24 rlwrap sqlite3 $dir/external.db
[all …]
/packages/providers/MediaProvider/tests/src/com/android/providers/media/scan/
DMediaScannerTest.java139 final File dir = Environment.getExternalStorageDirectory(); in testCorrectness() local
140 stage(R.raw.test_audio, new File(dir, "test.mp3")); in testCorrectness()
141 stage(R.raw.test_video, new File(dir, "test.mp4")); in testCorrectness()
142 stage(R.raw.test_image, new File(dir, "test.jpg")); in testCorrectness()
145 scanDirectory(mLegacy, dir, "legacy"); in testCorrectness()
146 scanDirectory(mModern, dir, "modern"); in testCorrectness()
203 final File dir = new File(Environment.getExternalStorageDirectory(), in testSpeed() local
206 stage(dir, 4, 3); in testSpeed()
210 FileUtils.deleteContents(dir); in testSpeed()
211 dir.delete(); in testSpeed()
[all …]
/packages/providers/MediaProvider/tests/src/com/android/providers/media/
DMediaDocumentsProviderTest.java107 for (String dir : new String[] { in testSimple()
112 assertProbe(resolver, "document", dir, "children"); in testSimple()
249 final File dir = new File(context.getExternalMediaDirs()[0], "test_" + System.nanoTime()); in stageTestMedia() local
250 dir.mkdirs(); in stageTestMedia()
251 FileUtils.deleteContents(dir); in stageTestMedia()
253 stage(R.raw.test_audio, new File(dir, "audio.mp3")); in stageTestMedia()
254 stage(R.raw.test_video, new File(dir, "video.mp4")); in stageTestMedia()
255 stage(R.raw.test_image, new File(dir, "image.jpg")); in stageTestMedia()
256 stage(R.raw.test_m3u, new File(dir, "playlist.m3u")); in stageTestMedia()
257 stage(R.raw.test_srt, new File(dir, "subtitle.srt")); in stageTestMedia()
[all …]
DIdleServiceTest.java61 final File dir = Environment.getExternalStorageDirectory(); in testPruneThumbnails() local
74 final File a = touch(buildPath(dir, DIRECTORY_PICTURES, ".thumbnails", "1234567.jpg")); in testPruneThumbnails()
75 final File b = touch(buildPath(dir, DIRECTORY_MOVIES, ".thumbnails", "7654321.jpg")); in testPruneThumbnails()
76 final File c = touch(buildPath(dir, DIRECTORY_PICTURES, ".thumbnails", id + ".jpg")); in testPruneThumbnails()
77 final File d = touch(buildPath(dir, DIRECTORY_PICTURES, ".thumbnails", "random.bin")); in testPruneThumbnails()
88 final File uuidFile = buildPath(dir, Environment.DIRECTORY_PICTURES, in testPruneThumbnails()
/packages/apps/Car/libs/car-ui-lib/tests/tools/
Dquick_rro.py52 for root, dirs, files in os.walk(args.dir):
84 def get_android_dir_priority(dir): argument
89 if len(dir) == 0:
91 if 'stable' in dir:
95 return int(dir.split('-')[1])
118 for dir in os.listdir(sdk_dir):
119 if os.path.isdir(os.path.join(sdk_dir, dir)):
120 if get_android_dir_priority(dir) > get_android_dir_priority(best_dir):
121 best_dir = dir
163 resource_folder = args.dir or os.path.join(root_folder, 'res')
[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/apps/Car/libs/car-ui-lib/tests/apitest/
Dresource_utils.py71 for dir in fileDirs:
72 type = dir.split('-')[0]
73 for file in os.listdir(os.path.join(resDir, dir)):
77 ResourceLocation(os.path.join(resDir, dir, file))))
78 if dir.startswith("layout"):
79 for resource in get_ids_from_layout_file(os.path.join(resDir, dir, file)):
82 for dir in valuesDirs:
83 for file in os.listdir(os.path.join(resDir, dir)):
85 for resource in get_resources_from_single_file(os.path.join(resDir, dir, file)):
DAndroid.mk19 LOCAL_PATH := $(call my-dir)
22 intermediates := $(call intermediates-dir-for, PACKAGING, Android,,COMMON)
29 $(hide) mkdir -p $(dir $@) && touch $@
/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/providers/MediaProvider/src/com/android/providers/media/util/
DFileUtils.java149 public static boolean deleteOlderFiles(File dir, int minCount, long minAgeMs) { in deleteOlderFiles() argument
154 final File[] files = dir.listFiles(); in deleteOlderFiles()
323 for (File dir : dirs) { in contains()
324 if (contains(dir, file)) { in contains()
333 for (File dir : dirs) { in contains()
334 if (contains(dir, file)) { in contains()
351 public static boolean contains(File dir, File file) { in contains() argument
352 if (dir == null || file == null) return false; in contains()
353 return contains(dir.getAbsolutePath(), file.getAbsolutePath()); in contains()
415 public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) { in walkFileTreeContents()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/logging/
DUserEventDispatcher.java162 event.action.dir = direction; in logTaskLaunchOrDismiss()
295 public void logActionOnContainer(int action, int dir, int containerType) { in logActionOnContainer() argument
296 logActionOnContainer(action, dir, containerType, 0); in logActionOnContainer()
299 public void logActionOnContainer(int action, int dir, int containerType, int pageIndex) { in logActionOnContainer() argument
302 event.action.dir = dir; in logActionOnContainer()
314 public void logStateChangeAction(int action, int dir, int downX, int downY, in logStateChangeAction() argument
329 event.action.dir = dir; in logStateChangeAction()
338 public void logActionOnItem(int action, int dir, int itemType) { in logActionOnItem() argument
339 logActionOnItem(action, dir, itemType, null, null); in logActionOnItem()
351 public void logActionOnItem(int touchAction, int dir, int itemType, in logActionOnItem() argument
[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()
59 File dir = getTempDir(context, timestamp); in createTempDir() local
60 dir.mkdirs(); in createTempDir()
61 return dir; in createTempDir()
/packages/providers/MediaProvider/src/com/android/providers/media/scan/
DModernMediaScanner.java467 private void acquireDirectoryLock(@NonNull Path dir) { in acquireDirectoryLock() argument
471 lock = mDirectoryLocks.get(dir); in acquireDirectoryLock()
474 mDirectoryLocks.put(dir, lock); in acquireDirectoryLock()
479 mAcquiredDirectoryLocks.add(dir); in acquireDirectoryLock()
488 private void releaseDirectoryLock(@NonNull Path dir) { in releaseDirectoryLock() argument
492 lock = mDirectoryLocks.get(dir); in releaseDirectoryLock()
497 mDirectoryLocks.remove(dir); in releaseDirectoryLock()
501 mAcquiredDirectoryLocks.remove(dir); in releaseDirectoryLock()
515 for (Path dir : new ArraySet<>(mAcquiredDirectoryLocks)) { in close()
516 releaseDirectoryLock(dir); in close()
[all …]
/packages/services/Car/car_product/sepolicy/private/
Dcarservice_app.te50 allow carservice_app system_app_data_file:dir create_dir_perms;
53 allow carservice_app system_car_data_file:dir create_dir_perms;
69 allow carservice_app sysfs:dir { open read search };
70 allow carservice_app sysfs_fs_ext4_features:dir { open read search};
71 allow carservice_app sysfs_fs_f2fs:dir { open read search };
84 allow carservice_app gpu_device:dir r_dir_perms;
/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/apps/Test/connectivity/sl4n/rapidjson/doc/diagram/
Dutilityclass.dot21 edge [arrowtail=onormal, dir=back]
35 edge [arrowtail=onormal, dir=back]
53 edge [arrowtail=onormal, dir=back]
58 edge [arrowtail=odiamond, arrowhead=vee, dir=both]
/packages/apps/Messaging/src/com/android/messaging/util/
DDebugUtils.java229 final File dir = DebugUtils.getDebugFilesDir(); in doInBackgroundTimed() local
230 return dir.list(new FilenameFilter() { in doInBackgroundTimed()
232 public boolean accept(final File dir, final String filename) { in doInBackgroundTimed()
332 final File dir = getDebugFilesDir();
333 final File file = new File(dir, fileName);
341 final File dir = Environment.getExternalStorageDirectory();
342 return dir;
/packages/apps/StorageManager/src/com/android/storagemanager/deletionhelper/
DFetchDownloadsLoader.java63 static DownloadsResult collectFiles(File dir) { in collectFiles() argument
64 return collectFiles(dir, new DownloadsResult()); in collectFiles()
67 private static DownloadsResult collectFiles(File dir, DownloadsResult result) { in collectFiles() argument
71 File downloadFiles[] = dir.listFiles(); in collectFiles()
/packages/services/Car/service/src/com/android/car/storagemonitoring/
DSysfsLifetimeWriteInfoProvider.java61 private LifetimeWriteInfo tryParse(File dir) { in tryParse() argument
62 File writefile = new File(dir, FILENAME); in tryParse()
87 dir.getName(), in tryParse()
88 dir.getParentFile().getName(), in tryParse()
/packages/apps/LegacyCamera/src/com/android/camera/
DStorage.java115 File dir = new File(DIRECTORY); in getAvailableSpace() local
116 dir.mkdirs(); in getAvailableSpace()
117 if (!dir.isDirectory() || !dir.canWrite()) { in getAvailableSpace()
/packages/services/Car/car-bugreportd/
Dmain.cpp423 status_t createTempDir(const char* dir) { in createTempDir() argument
425 if (TEMP_FAILURE_RETRY(stat(dir, &sb)) == 0) { in createTempDir()
426 if (!recursiveRemoveDir(dir)) { in createTempDir()
430 ALOGE("Failed to stat %s ", dir); in createTempDir()
433 if (TEMP_FAILURE_RETRY(mkdir(dir, 0700)) == -1) { in createTempDir()
434 ALOGE("Failed to mkdir %s", dir); in createTempDir()
/packages/apps/Bluetooth/src/com/android/bluetooth/opp/
DBluetoothOppProvider.java221 Integer dir = values.getAsInteger(BluetoothShare.DIRECTION); in insert() local
224 if (dir == null) { in insert()
225 dir = BluetoothShare.DIRECTION_OUTBOUND; in insert()
227 if (dir == BluetoothShare.DIRECTION_OUTBOUND && con == null) { in insert()
230 if (dir == BluetoothShare.DIRECTION_INBOUND && con == null) { in insert()
234 filteredValues.put(BluetoothShare.DIRECTION, dir); in insert()
/packages/apps/Launcher3/src/com/android/launcher3/touch/
DSingleAxisSwipeDetector.java98 @NonNull Direction dir) { in SingleAxisSwipeDetector() argument
99 this(ViewConfiguration.get(context), l, dir, Utilities.isRtl(context.getResources())); in SingleAxisSwipeDetector()
104 @NonNull Direction dir, boolean isRtl) { in SingleAxisSwipeDetector() argument
107 mDir = dir; in SingleAxisSwipeDetector()
/packages/services/Car/procfs-inspector/server/
Ddirectory.h59 void operator()(DIR* dir) { in operator()
60 if (dir) closedir(dir); in operator()

12345678910