Searched defs:directory (Results 1 - 10 of 10) sorted by relevance

/packages/apps/Camera2/src/com/android/camera/util/
H A DFileUtil.java28 * 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/Messaging/src/com/android/messaging/util/
H A DFileUtil.java34 private static synchronized File getNewFile(File directory, String extension, argument
41 File testFile = new File(directory, newName);
55 * @param directory directory that the file should be saved to
60 public static File getNewFile(File directory, String contentType) throws IOException { argument
67 return getNewFile(directory, fileExtension, fileNameFormat);
92 * Move all files and folders under a directory into the target.
97 LogUtil.e(LogUtil.BUGLE_TAG, "Can't move directory content since the source " +
98 "directory is a parent of the target");
120 * Checks, whether the child directory i
[all...]
/packages/apps/UnifiedEmail/src/org/apache/commons/io/output/
H A DDeferredFileOutputStream.java82 * 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/apps/Camera2/src/com/android/camera/data/
H A DFilmstripItemBase.java142 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/UnifiedEmail/src/org/apache/commons/io/
H A DDirectoryWalker.java29 * 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 DFileUtils.java54 * <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 DProviderTestUtils.java452 * 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 DStorage.java305 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/Gallery/src/com/android/camera/
H A DImageManager.java195 // 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 DUtility.java474 * 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

Completed in 407 milliseconds