Searched refs:directory (Results 1 - 23 of 23) 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/Email/tests/src/com/android/emailcommon/utility/
H A DUtilityTest.java105 final File directory =
109 Utility.createUniqueFileInternal(getCountdownFileCreator(), directory, "file");
114 Utility.createUniqueFileInternal(getTrueFileCreator(), directory, "file");
119 Utility.createUniqueFileInternal(getCountdownFileCreator(), directory, "file.ext");
124 Utility.createUniqueFileInternal(getTrueFileCreator(), directory, "file.ext");
131 final File directory =
135 Utility.createUniqueFileInternal(getTrueFileCreator(), directory, "file%s");
139 Utility.createUniqueFileInternal(getTrueFileCreator(), directory, "file%s.ext");
145 final File directory =
149 Utility.createUniqueFileInternal(getTrueFileCreator(), directory, "fil
[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/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/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/
H A DBinaryDictionaryGetter.java68 * Generates a unique temporary file name in the app cache directory.
73 final File directory = new File(DictionaryInfoUtils.getWordListTempDirectory(context));
74 if (!directory.exists()) {
75 if (!directory.mkdirs()) {
76 Log.e(TAG, "Could not create the temporary directory");
82 return File.createTempFile("xxx" + safeId, null, directory).getAbsolutePath();
163 for (File directory : directoryList) {
164 if (!directory.isDirectory()) continue;
166 DictionaryInfoUtils.getWordListIdFromFileName(directory.getName());
169 final File[] wordLists = directory
[all...]
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/
H A DBinaryDictUtils.java54 final FormatOptions formatOptions, final File directory) {
56 return new File(directory, name + "." + version + TEST_DICT_FILE_EXTENSION);
58 return new File(directory, name + "." + version);
53 getDictFile(final String name, final String version, final FormatOptions formatOptions, final File directory) argument
/packages/apps/ContactsCommon/src/com/android/contacts/common/list/
H A DPhoneNumberListAdapter.java141 final DirectoryPartition directory = getExtendedDirectoryFromId(directoryId);
142 final String contentUri = directory.getContentUri();
144 throw new IllegalStateException("Extended directory must have a content URL: "
145 + directory);
150 String.valueOf(getDirectoryResultLimit(directory)));
381 final DirectoryPartition directory = (DirectoryPartition) getPartition(partition);
382 bindPhoneNumber(view, cursor, directory.isDisplayNumber());
479 * a. The highest directory id so that we can assign unused id's to the extended directories.
480 * b. The index of the last non-remote directory. This is where we will insert extended
520 final DirectoryPartition directory
[all...]
/packages/providers/ContactsProvider/src/com/android/providers/contacts/debug/
H A DDataExporter.java86 // Do not allow queries to use relative paths to leave the root directory. Otherwise they
104 final File directory = getOutputDirectory(context);
105 if (!directory.exists()) {
106 directory.mkdir();
149 // Don't need the cache directory, which also contains the dump files.
153 // This check is redundant as the output directory should be in the cache dir,
/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
H A DCropImage.java352 File directory = new File(oldPath.getParent());
362 String candidate = directory.toString()
378 directory.toString(), fileName + "-" + x + ".jpg",
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/
H A DDictionaryInfoUtils.java104 * Escapes a string for any characters that may be suspicious for a file or directory name.
129 * Helper method to get the top level cache directory.
136 * Helper method to get the top level temp directory.
187 * Find out the cache directory associated with a specific locale.
193 final File directory = new File(absoluteDirectoryName);
194 if (!directory.exists()) {
195 if (!directory.mkdirs()) {
196 Log.e(TAG, "Could not create the directory for locale" + locale);
209 * The file name is pretty much an URL-encoded version of the id inside a directory
214 * @param context the context to use for getting the directory
[all...]
/packages/apps/Contacts/src/com/android/contacts/list/
H A DContactBrowseListFragment.java441 DirectoryPartition directory = (DirectoryPartition) partition;
442 if (directory.getDirectoryId() == mSelectedContactDirectoryId) {
443 directoryLoading = directory.isLoading();
526 * and to save bandwidth on directory queries.
/packages/apps/UnifiedEmail/src/com/android/mail/providers/
H A DEmlAttachmentProvider.java280 * from cache to the external downloads directory (usually the sd card).
478 // we want the root of the downloads directory if the attachment is
482 final File directory = new File(directoryPath);
483 if (!directory.exists()) {
484 directory.mkdirs();
490 * Returns the root directory for the attachments for the specific uri.
497 * Returns the cache directory for eml attachment files.
504 * Recursively delete the directory at the passed file path.
511 * Recursively deletes a file or directory.
/packages/apps/ContactsCommon/src/com/android/contacts/common/vcard/
H A DImportVCardActivity.java210 * Caches given vCard files into a local directory, and sends actual import request to
666 private void getVCardFileRecursively(File directory) argument
672 // e.g. secured directory may return null toward listFiles().
673 final File[] files = directory.listFiles();
675 final String currentDirectoryPath = directory.getCanonicalPath();
679 Log.w(LOG_TAG, "listFiles() returned null (directory: " + directory + ")");
683 for (File file : directory.listFiles()) {
/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
/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);
H A DProviderTests.java1538 File directory = Environment.getExternalStorageDirectory();
1545 File file = new File(directory, fileNames[i]);
/packages/apps/OMA-DM/engine/dmlib/tool-src/dmt_gen_tool/com/mot/dm/core/
H A DDMTValidator.java22 // Dmt.zip directory heirarchy, and have numerous sanity checks built in which
61 "\t\t -d : dirName points to the directory where Dmt is located\n");
80 System.err.println("Error: No directory specified!");
86 // Check to make sure the directory we are passed is valid
89 System.err.println("Error: Invalid directory specified!");
174 // Process the directory
176 Node directory = NodeLoader.getInstance(dirName);
177 Node[] children = directory.listNodes();
677 // Either dir does not exist or is not a directory
1125 // Utility function to parse the contents of parm.txt files in each DMT directory
[all...]
H A DGen.java22 // Dmt.zip directory heirarchy, and generate the necessary data and meta data
98 //See which directory contains the path
1304 "\t -d : dirName points to the directory where Dmt is located\n" +
1545 //Convert all XML files from current directory to WBXML (replace Python script).
1666 Node directory = NodeLoader.getInstance(dirName); //changed to support FlexML, replaced File()
1667 Node[] children = directory.listNodes(); //changed to support FlexML, replaced listFiles().
1870 // Either dir does not exist or is not a directory
1873 // first check if there is a multi node directory and generate subtree
2370 else { //directory
/packages/apps/Email/emailcommon/src/com/android/emailcommon/provider/
H A DEmailContent.java1517 File directory = Environment.getExternalStorageDirectory();
1518 File file = new File(directory, filename);
1531 file = new File(directory, name + '-' + i + extension);
/packages/providers/ContactsProvider/src/com/android/providers/contacts/
H A DContactsProvider2.java3380 null, -1 /* directory ID */, null);
4466 selection, selectionArgs, null, -1 /* directory ID */, null);
5031 String directory = getQueryParameter(uri, ContactsContract.DIRECTORY_PARAM_KEY);
5033 (directory == null ? -1 :
5034 (directory.equals("0") ? Directory.DEFAULT :
5035 (directory.equals("1") ? Directory.LOCAL_INVISIBLE : Long.MIN_VALUE)));
5043 DirectoryInfo directoryInfo = getDirectoryAuthority(directory);
5045 Log.e(TAG, "Invalid directory ID: " + uri);
5139 * Reads and caches directory information for the database.
6519 /* selection */ null, /* args */ null, /* order */ null, /* directory */
[all...]
/packages/providers/MediaProvider/src/com/android/providers/media/
H A DMediaProvider.java2928 if (LOCAL_LOGV) Log.v(TAG, "inserting directory " + path);
3627 * @param path The path to the new .nomedia file or hidden directory
3668 * a directory from hidden to non-hidden in the MediaScanner and MtpDatabase,
3799 // we will not attempt to create the first directory in the path
3804 File directory = new File(directoryPath);
3805 if (!directory.exists())
4183 // the directory name as a prefix
4189 // MtpDatabase will rename the directory first, so we test the new file name
4204 // first rename the row for the directory
4209 // update the paths of any files and folders contained in the directory
[all...]

Completed in 1101 milliseconds