/packages/apps/Camera2/src/com/android/camera/util/ |
H A D | FileUtil.java | 28 * Deletes the given directory and all it's contents, including 31 * @param directory The directory to delete. 34 public static boolean deleteDirectoryRecursively(File directory) { argument 35 if (!directory.exists() || !directory.isDirectory()) { 39 for (File entry : directory.listFiles()) { 47 return directory.delete();
|
/packages/apps/StorageManager/src/com/android/storagemanager/deletionhelper/ |
H A D | FetchDownloadsLoader.java | 36 * directory which have not been modified in longer than 90 days. 44 * Sets up a FetchDownloadsLoader in any directory. 46 * @param directory The directory to look into. 48 public FetchDownloadsLoader(Context context, File directory) { argument 50 mDirectory = directory;
|
/packages/apps/DocumentsUI/src/com/android/documentsui/ |
H A D | ScopedAccessMetrics.java | 37 * Methods for logging scoped directory access metrics. 88 public static void logValidScopedAccessRequest(Activity activity, String directory, argument 91 if (DIRECTORY_ROOT.equals(directory)) { 95 if (STANDARD_DIRECTORIES[i].equals(directory)) {
|
H A D | ScopedAccessProvider.java | 80 * Provider used to manage scoped access directory permissions. 94 * had a scoped access directory permission granted or denied. 97 * had a scoped access directory 243 && grantedDirs.contains(rawPermission.directory)) { 249 getExternalDirectoryName(rawPermission.directory), 0 282 if (p.directory == null) { 285 Log.w(TAG, "ignoring entry whose uuid and directory is null"); 290 if (!ArrayUtils.contains(Environment.STANDARD_DIRECTORIES, p.directory)) { 291 if (DEBUG) Log.v(TAG, "Ignoring non-standard directory on " + p); 301 dirs.add(p.directory); 443 persistUriPermission(String packageName, @Nullable String uuid, @Nullable String directory, boolean granted) argument [all...] |
/packages/apps/Messaging/src/com/android/messaging/util/ |
H A D | FileUtil.java | 38 private static synchronized File getNewFile(File directory, String extension, argument 45 File testFile = new File(directory, newName); 59 * @param directory directory that the file should be saved to 64 public static File getNewFile(File directory, String contentType) throws IOException { argument 71 return getNewFile(directory, fileExtension, fileNameFormat); 96 * Move all files and folders under a directory into the target. 101 LogUtil.e(LogUtil.BUGLE_TAG, "Can't move directory content since the source " + 102 "directory is a parent of the target"); 139 * Checks, whether the child directory i [all...] |
/packages/apps/Settings/src/com/android/settings/applications/ |
H A D | DirectoryAccessDetails.java | 74 * Detailed settings for an app's directory access permissions (A.K.A Scoped Directory Access). 80 * directory in the primary storage, then adding additional entries for the external volumes (one 288 @Nullable String uuid, @Nullable String directory) { 290 Log.d(TAG, "Asking " + providerUri + " to update " + uuid + "/" + directory + " to " 296 null, new String[] { mPackageName, uuid, directory }); 298 Log.d(TAG, "Updated " + updated + " entries for " + uuid + "/" + directory); 287 resetDoNotAskAgain(Context context, boolean newValue, Uri providerUri, @Nullable String uuid, @Nullable String directory) argument
|
/packages/apps/UnifiedEmail/src/org/apache/commons/io/output/ |
H A D | DeferredFileOutputStream.java | 82 * The directory to use for temporary files. 84 private File directory; field in class:DeferredFileOutputStream 119 * @param directory Temporary file directory. 123 public DeferredFileOutputStream(int threshold, String prefix, String suffix, File directory) argument 131 this.directory = directory; 163 outputFile = File.createTempFile(prefix, suffix, directory);
|
/packages/services/Car/tests/common_utils/src/com/android/car/test/utils/ |
H A D | TemporaryDirectory.java | 30 * A utility class that creates a temporary directory. 31 * The directory, and any files contained within, are automatically deleted when calling close(). 37 * } // directory gets deleted here 63 TemporaryDirectory(Path directory) throws IOException { argument 64 mDirectory = Files.createDirectory(directory);
|
/packages/apps/Camera2/src/com/android/camera/data/ |
H A D | FilmstripItemBase.java | 142 private void deleteIfEmptyCameraSubDir(File directory) { argument 143 // Make sure 'directory' refers to a valid existing empty directory. 144 if (!directory.exists() || !directory.isDirectory() || directory.list().length != 0) { 148 // Check if this is a 'Camera' sub-directory. 150 String fileParentPathStr = directory.getParentFile().getAbsolutePath(); 153 // Delete the directory if it's an empty sub-directory o [all...] |
/packages/apps/DocumentsUI/src/com/android/documentsui/inspector/ |
H A D | RuntimeDataSupplier.java | 90 public void loadDirCount(DocumentInfo directory, Consumer<Integer> updateView) { argument 91 checkArgument(directory.isDirectory()); 93 directory.authority, directory.documentId);
|
H A D | InspectorController.java | 229 * Displays a directory's information to the view. 231 * @param count - number of items in the directory. 307 * @param directory - a documentInfo thats a directory. 311 void loadDirCount(DocumentInfo directory, Consumer<Integer> callback); argument
|
/packages/apps/DocumentsUI/src/com/android/documentsui/prefs/ |
H A D | ScopedAccessLocalPreferences.java | 43 * Methods for accessing the local preferences with regards to scoped directory access. 73 * Methods below are used to keep track of denied user requests on scoped directory access so 85 String packageName, @Nullable String uuid, String directory) { 86 final String key = getScopedAccessDenialsKey(packageName, uuid, directory); 91 @Nullable String uuid, String directory, @PermissionStatus int status) { 92 checkArgument(!TextUtils.isEmpty(directory), 93 "Cannot pass empty directory - did you mean %s?", DIRECTORY_ROOT); 94 final String key = getScopedAccessDenialsKey(packageName, uuid, directory); 96 Log.d(TAG, "Setting permission of " + packageName + ":" + uuid + ":" + directory 124 String directory) { 84 getScopedAccessPermissionStatus(Context context, String packageName, @Nullable String uuid, String directory) argument 90 setScopedAccessPermissionStatus(Context context, String packageName, @Nullable String uuid, String directory, @PermissionStatus int status) argument 123 getScopedAccessDenialsKey(String packageName, @Nullable String uuid, String directory) argument 222 public final String directory; field in class:ScopedAccessLocalPreferences.Permission 225 Permission(String pkg, String uuid, String directory, Integer status) argument [all...] |
/packages/apps/DocumentsUI/tests/common/com/android/documentsui/bots/ |
H A D | Bots.java | 39 public final DirectoryListBot directory; field in class:Bots 53 directory = new DirectoryListBot(device, automation, context, TIMEOUT); 63 * A test helper class that provides support for controlling directory list
|
/packages/apps/UnifiedEmail/src/org/apache/commons/io/ |
H A D | DirectoryWalker.java | 29 * Abstract class that walks through a directory hierarchy and provides 65 * protected boolean handleDirectory(File directory, int depth, Collection results) { 67 * if (".svn".equals(directory.getName())) { 68 * directory.delete(); 119 * // Combine the directory and file filters using an OR condition 226 * protected boolean handleDirectory(File directory, int depth, Collection results) throws IOException { 227 * // cancel if hidden directory 228 * if (directory.isHidden()) { 258 * The limit on the directory depth to walk. 287 * Construct an instance with a directory an 350 walk(File directory, int depth, Collection results) argument 488 handleDirectory(File directory, int depth, Collection results) argument 503 handleDirectoryStart(File directory, int depth, Collection results) argument 531 handleRestricted(File directory, int depth, Collection results) argument 545 handleDirectoryEnd(File directory, int depth, Collection results) argument [all...] |
H A D | FileUtils.java | 54 * <li>make a directory including parent directories 121 * An exception is thrown if the file object exists but is a directory. 127 * @throws IOException if the file object is a directory 134 throw new IOException("File '" + file + "' exists but is a directory"); 148 * creating the parent directory if it does not exist. 153 * The parent directory will be created if it does not exist. 155 * An exception is thrown if the file object exists but is a directory. 157 * An exception is thrown if the parent directory cannot be created. 161 * @throws IOException if the file object is a directory 163 * @throws IOException if a parent directory need 254 innerListFiles(Collection<File> files, File directory, IOFileFilter filter) argument 293 listFiles( File directory, IOFileFilter fileFilter, IOFileFilter dirFilter) argument 340 iterateFiles( File directory, IOFileFilter fileFilter, IOFileFilter dirFilter) argument 372 listFiles( File directory, String[] extensions, boolean recursive) argument 397 iterateFiles( File directory, String[] extensions, boolean recursive) argument 976 deleteDirectory(File directory) argument 1028 cleanDirectory(File directory) argument 1422 deleteDirectoryOnExit(File directory) argument 1438 cleanDirectoryOnExit(File directory) argument 1478 forceMkdir(File directory) argument 1505 sizeOfDirectory(File directory) argument [all...] |
/packages/apps/Email/tests/src/com/android/email/provider/ |
H A D | ProviderTestUtils.java | 452 * Create a temporary EML file based on {@code msg} in the directory {@code directory}. 454 public static Uri createTempEmlFile(Context context, Message msg, File directory) argument 457 File outputFile = File.createTempFile("message", "tmp", directory);
|
/packages/apps/Camera2/src/com/android/camera/ |
H A D | Storage.java | 305 Log.e(TAG, "Failed to create parent directory for file: " + path); 334 Log.e(TAG, "Input path is directory: " + inputPath.getAbsolutePath()); 338 Log.e(TAG, "Failed to create parent directory for file: " + 372 * Given a file path, makes sure the directory it's in exists, and if not 376 * @return Whether the directory exists. If 'false' is returned, this file 377 * cannot be written to since the parent directory could not be 383 // If the parent exists, return 'true' if it is a directory. If it's a 422 public static String generateFilepath(String directory, String title, String mimeType) { argument 431 return (new File(directory, title + extension)).getAbsolutePath();
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/inspector/ |
H A D | InspectorControllerTest.java | 461 public void loadDirCount(DocumentInfo directory, Consumer<Integer> callback) { argument
|
/packages/apps/Gallery/src/com/android/camera/ |
H A D | ImageManager.java | 195 // directory and filename). Also add an entry to the media store for 201 Location location, String directory, String filename, 206 String filePath = directory + "/" + filename; 208 File dir = new File(directory); 210 File file = new File(directory, filename); 439 // It's important not to put it in the root directory which may have a 443 File directory = new File(directoryName); 444 if (!directory.isDirectory()) { 445 if (!directory.mkdirs()) { 200 addImage(ContentResolver cr, String title, long dateTaken, Location location, String directory, String filename, Bitmap source, byte[] jpegData, int[] degree) argument
|
/packages/apps/Email/emailcommon/src/com/android/emailcommon/utility/ |
H A D | Utility.java | 474 * Creates a new empty file with a unique name in the given directory by appending a hyphen and 479 public static File createUniqueFile(File directory, String filename) throws IOException { argument 480 return createUniqueFileInternal(NewFileCreator.DEFAULT, directory, filename); 484 final File directory, final String filename) throws IOException { 485 final File file = new File(directory, filename); 503 new File(directory, name + "-" + Integer.toString(i) + extension); 483 createUniqueFileInternal(final NewFileCreator nfc, final File directory, final String filename) argument
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ |
H A D | ContactsProvider2Test.java | 134 String directory = String.valueOf(Directory.ENTERPRISE_DEFAULT); 137 .appendQueryParameter(ContactsContract.DIRECTORY_PARAM_KEY, directory) 151 String directory = String.valueOf(Directory.DEFAULT); 154 .appendQueryParameter(ContactsContract.DIRECTORY_PARAM_KEY, directory) 1174 // Access the same data through the directory under RawContacts 1180 // Access the same data through the directory under Contacts 2817 private Uri buildContactsFilterUriWithDirectory(String directory) { argument 2819 .appendQueryParameter(ContactsContract.DIRECTORY_PARAM_KEY, directory).build();
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/ |
H A D | ContactsProvider2.java | 3557 null, -1 /* directory ID */, null); 4264 * Scans all packages owned by the specified calling UID looking for contact directory 4725 selection, selectionArgs, null, -1 /* directory ID */, null); 5568 String directory = getQueryParameter(uri, ContactsContract.DIRECTORY_PARAM_KEY); 5570 (directory == null ? -1 : 5571 (directory.equals("0") ? Directory.DEFAULT : 5572 (directory.equals("1") ? Directory.LOCAL_INVISIBLE : Long.MIN_VALUE))); 5581 directory, cancellationSignal); 5586 final String directory = getQueryParameter(uri, ContactsContract.DIRECTORY_PARAM_KEY); 5587 if (directory 5637 queryDirectoryAuthority(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder, String directory, final CancellationSignal cancellationSignal) argument [all...] |