/packages/apps/UnifiedEmail/src/org/apache/commons/io/ |
D | FileUtils.java | 131 public static FileInputStream openInputStream(File file) throws IOException { in openInputStream() argument 132 if (file.exists()) { in openInputStream() 133 if (file.isDirectory()) { in openInputStream() 134 throw new IOException("File '" + file + "' exists but is a directory"); in openInputStream() 136 if (file.canRead() == false) { in openInputStream() 137 throw new IOException("File '" + file + "' cannot be read"); in openInputStream() 140 throw new FileNotFoundException("File '" + file + "' does not exist"); in openInputStream() 142 return new FileInputStream(file); in openInputStream() 166 public static FileOutputStream openOutputStream(File file) throws IOException { in openOutputStream() argument 167 if (file.exists()) { in openOutputStream() [all …]
|
D | DirectoryWalker.java | 393 …protected final void checkIfCancelled(File file, int depth, Collection results) throws IOException… in checkIfCancelled() argument 394 if (handleIsCancelled(file, depth, results)) { in checkIfCancelled() 395 throw new CancelException(file, depth); in checkIfCancelled() 435 File file, int depth, Collection results) throws IOException { in handleIsCancelled() argument 517 protected void handleFile(File file, int depth, Collection results) throws IOException { in handleFile() argument 572 private File file; field in DirectoryWalker.CancelException 583 public CancelException(File file, int depth) { in CancelException() argument 584 this("Operation Cancelled", file, depth); in CancelException() 596 public CancelException(String message, File file, int depth) { in CancelException() argument 598 this.file = file; in CancelException() [all …]
|
/packages/apps/UnifiedEmail/src/org/apache/commons/io/output/ |
D | LockableFileWriter.java | 107 public LockableFileWriter(File file) throws IOException { in LockableFileWriter() argument 108 this(file, false, null); in LockableFileWriter() 119 public LockableFileWriter(File file, boolean append) throws IOException { in LockableFileWriter() argument 120 this(file, append, null); in LockableFileWriter() 132 public LockableFileWriter(File file, boolean append, String lockDir) throws IOException { in LockableFileWriter() argument 133 this(file, null, append, lockDir); in LockableFileWriter() 144 public LockableFileWriter(File file, String encoding) throws IOException { in LockableFileWriter() argument 145 this(file, encoding, false, null); in LockableFileWriter() 158 public LockableFileWriter(File file, String encoding, boolean append, in LockableFileWriter() argument 162 file = file.getAbsoluteFile(); in LockableFileWriter() [all …]
|
D | FileWriterWithEncoding.java | 140 public FileWriterWithEncoding(File file, String encoding) throws IOException { in FileWriterWithEncoding() argument 141 this(file, encoding, false); in FileWriterWithEncoding() 153 public FileWriterWithEncoding(File file, String encoding, boolean append) throws IOException { in FileWriterWithEncoding() argument 155 this.out = initWriter(file, encoding, append); in FileWriterWithEncoding() 166 public FileWriterWithEncoding(File file, Charset encoding) throws IOException { in FileWriterWithEncoding() argument 167 this(file, encoding, false); in FileWriterWithEncoding() 179 public FileWriterWithEncoding(File file, Charset encoding, boolean append) throws IOException { in FileWriterWithEncoding() argument 181 this.out = initWriter(file, encoding, append); in FileWriterWithEncoding() 192 public FileWriterWithEncoding(File file, CharsetEncoder encoding) throws IOException { in FileWriterWithEncoding() argument 193 this(file, encoding, false); in FileWriterWithEncoding() [all …]
|
/packages/providers/DownloadProvider/src/com/android/providers/downloads/ |
D | StorageUtils.java | 157 return (int) (lhs.file.lastModified() - rhs.file.lastModified()); in freeCacheStorage() 162 for (ConcreteFile file : files) { in freeCacheStorage() 165 if (now - file.file.lastModified() < MIN_DELETE_AGE) { in freeCacheStorage() 166 Slog.d(TAG, "Skipping recently modified " + file.file); in freeCacheStorage() 168 final long len = file.file.length(); in freeCacheStorage() 169 Slog.d(TAG, "Deleting " + file.file + " to reclaim " + len); in freeCacheStorage() 171 file.file.delete(); in freeCacheStorage() 189 private static long getDeviceId(File file) { in getDeviceId() argument 191 return Os.stat(file.getAbsolutePath()).st_dev; in getDeviceId() 221 final ConcreteFile file = new ConcreteFile(child); in listFilesRecursive() local [all …]
|
D | Helpers.java | 90 final File file = new File(Uri.parse(hint).getPath()); in generateSaveFile() local 91 parent = file.getParentFile().getAbsoluteFile(); in generateSaveFile() 93 name = file.getName(); in generateSaveFile() 144 final File file = new File(parent, name); in generateSaveFile() 145 file.createNewFile(); in generateSaveFile() 146 return file.getAbsolutePath(); in generateSaveFile() 344 static boolean isFilenameValid(Context context, File file) { in isFilenameValid() argument 345 return isFilenameValid(context, file, true); in isFilenameValid() 348 static boolean isFilenameValidInExternal(Context context, File file) { in isFilenameValidInExternal() argument 349 return isFilenameValid(context, file, false); in isFilenameValidInExternal() [all …]
|
D | DownloadIdleService.java | 144 final File file = new File(path); in cleanOrphans() local 146 fromDb.add(new ConcreteFile(file)); in cleanOrphans() 149 final String state = Environment.getExternalStorageState(file); in cleanOrphans() 157 Slog.d(TAG, "Missing " + file + ", deleting " + id); in cleanOrphans() 178 for (ConcreteFile file : fromDisk) { in cleanOrphans() 179 if (!fromDb.contains(file)) { in cleanOrphans() 180 Slog.d(TAG, "Missing db entry, deleting " + file.file); in cleanOrphans() 181 file.file.delete(); in cleanOrphans()
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/ |
D | PhotoStore.java | 90 for (File file : files) { in clear() 91 cleanupFile(file); in clear() 123 for (File file : files) { in initialize() 125 Entry entry = new Entry(file); in initialize() 129 cleanupFile(file); in initialize() 194 File file = null; in insert() local 198 file = File.createTempFile("img", null, mStorePath); in insert() 199 FileOutputStream fos = new FileOutputStream(file); in insert() 212 if (file.renameTo(target)) { in insert() 223 if (file != null) { in insert() [all …]
|
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/ |
D | FileCache.java | 79 for (File file : rootDir.listFiles()) { in deleteFiles() 80 String name = file.getName(); in deleteFiles() 81 if (file.isFile() && name.startsWith(FILE_PREFIX) in deleteFiles() 82 && name.endsWith(FILE_POSTFIX)) file.delete(); in deleteFiles() 100 public void store(String downloadUrl, File file) { in store() argument 103 Utils.assertTrue(file.getParentFile().equals(mRootDir)); in store() 107 entry.filename = file.getName(); in store() 108 entry.size = file.length(); in store() 111 file.delete(); in store() 117 file.delete(); in store() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/tools/ |
D | SaveImage.java | 214 for (File file : auxFiles) { in deleteAuxFiles() 215 file.delete(); in deleteAuxFiles() 237 public boolean putPanoramaXMPData(File file, Object xmp) { in putPanoramaXMPData() argument 239 return XmpUtilHelper.writeXMPMeta(file.getAbsolutePath(), xmp); in putPanoramaXMPData() 266 public boolean putExifData(File file, ExifInterface exif, Bitmap image, in putExifData() argument 271 s = exif.getExifWriterStream(file.getAbsolutePath()); in putExifData() 279 Log.w(LOGTAG, "File not found: " + file.getAbsolutePath(), e); in putExifData() 531 File file = new File(saveDirectory, filename + ".JPG"); in makeAndInsertUri() local 532 return linkNewFileToUri(context, sourceUri, file, time, false); in makeAndInsertUri() 583 File file = getLocalFileFromUri(context, sourceUri); in getSaveDirectory() local [all …]
|
/packages/apps/Camera/jni/feature_mos/doc/ |
D | feature_mos_API_doxyfile | 3 # This file describes the settings to be used by the documentation system 17 # This tag specifies the encoding used for all characters in the config file 48 # otherwise cause performance problems for the file system. 67 # the file and class documentation (similar to JavaDoc). 86 # "The $name file" "is" "provides" "specifies" "contains" 91 "The $name file" \ 115 # path before files name in the file list and in the header files. If set 116 # to NO the shortest path that makes the file name unique will be used. 123 # the path. The tag can be used to show relative paths in the file list. 131 # the reader which header file to include in order to use a class. [all …]
|
/packages/apps/Camera/jni/feature_stab/doc/ |
D | dbreg_API_doxyfile | 3 # This file describes the settings to be used by the documentation system 17 # This tag specifies the encoding used for all characters in the config file 48 # otherwise cause performance problems for the file system. 67 # the file and class documentation (similar to JavaDoc). 86 # "The $name file" "is" "provides" "specifies" "contains" 91 "The $name file" \ 115 # path before files name in the file list and in the header files. If set 116 # to NO the shortest path that makes the file name unique will be used. 123 # the path. The tag can be used to show relative paths in the file list. 131 # the reader which header file to include in order to use a class. [all …]
|
/packages/apps/LegacyCamera/jni/feature_stab/doc/ |
D | dbreg_API_doxyfile | 3 # This file describes the settings to be used by the documentation system 17 # This tag specifies the encoding used for all characters in the config file 48 # otherwise cause performance problems for the file system. 67 # the file and class documentation (similar to JavaDoc). 86 # "The $name file" "is" "provides" "specifies" "contains" 91 "The $name file" \ 115 # path before files name in the file list and in the header files. If set 116 # to NO the shortest path that makes the file name unique will be used. 123 # the path. The tag can be used to show relative paths in the file list. 131 # the reader which header file to include in order to use a class. [all …]
|
/packages/apps/LegacyCamera/jni/feature_mos/doc/ |
D | feature_mos_API_doxyfile | 3 # This file describes the settings to be used by the documentation system 17 # This tag specifies the encoding used for all characters in the config file 48 # otherwise cause performance problems for the file system. 67 # the file and class documentation (similar to JavaDoc). 86 # "The $name file" "is" "provides" "specifies" "contains" 91 "The $name file" \ 115 # path before files name in the file list and in the header files. If set 116 # to NO the shortest path that makes the file name unique will be used. 123 # the path. The tag can be used to show relative paths in the file list. 131 # the reader which header file to include in order to use a class. [all …]
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/utils/ |
D | dict_file_writing_utils.cpp | 90 /* static */ bool DictFileWritingUtils::writeBufferToFileTail(FILE *const file, in writeBufferToFileTail() argument 96 if (fwrite(bufferSize, SIZE_OF_BUFFER_SIZE_FIELD, 1 /* count */, file) < 1) { in writeBufferToFileTail() 99 return writeBufferToFile(file, buffer); in writeBufferToFileTail() 110 FILE *const file = fdopen(fd, "wb"); in flushBufferToFile() local 111 if (!file) { in flushBufferToFile() 116 if (!writeBufferToFile(file, buffer)) { in flushBufferToFile() 117 fclose(file); in flushBufferToFile() 124 fclose(file); in flushBufferToFile() 129 /* static */ bool DictFileWritingUtils::writeBufferToFile(FILE *const file, in writeBufferToFile() argument 133 originalBufSize, 1, file) < 1) { in writeBufferToFile() [all …]
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/ |
D | DictDecoder.java | 129 public DictBuffer getDictionaryBuffer(final File file) in getDictionaryBuffer() argument 143 public DictBuffer getDictionaryBuffer(final File file) in getDictionaryBuffer() argument 148 inStream = new FileInputStream(file); in getDictionaryBuffer() 150 0, file.length()); in getDictionaryBuffer() 172 public DictBuffer getDictionaryBuffer(final File file) in getDictionaryBuffer() argument 176 inStream = new FileInputStream(file); in getDictionaryBuffer() 177 final byte[] array = new byte[(int) file.length()]; in getDictionaryBuffer() 199 public DictBuffer getDictionaryBuffer(final File file) in getDictionaryBuffer() argument 204 raFile = new RandomAccessFile(file, "rw"); in getDictionaryBuffer() 205 buffer = raFile.getChannel().map(FileChannel.MapMode.READ_WRITE, 0, file.length()); in getDictionaryBuffer()
|
/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
D | DownloadCache.java | 96 File file = new File(cursor.getString(QUERY_INDEX_DATA)); in findEntryInDatabase() local 102 entry = new Entry(id, file); in findEntryInDatabase() 188 private synchronized long insertEntry(String url, File file) { in insertEntry() argument 189 long size = file.length(); in insertEntry() 194 values.put(Columns.DATA, file.getAbsolutePath()); in insertEntry() 235 for (File file : mRoot.listFiles()) { in onCreate() 236 if (!file.delete()) { in onCreate() 237 Log.w(TAG, "fail to remove: " + file.getAbsolutePath()); in onCreate() 287 File file = future.get(); in onFutureDone() local 289 if (file != null) { // insert to database in onFutureDone() [all …]
|
/packages/services/Telephony/src/com/android/phone/ |
D | CallTime.java | 198 File file = PhoneGlobals.getInstance().getDir ("phoneTrace", Context.MODE_PRIVATE); in startTrace() local 199 if (file.exists() == false) { in startTrace() 200 file.mkdirs(); in startTrace() 202 String baseName = file.getPath() + File.separator + "callstate"; in startTrace() 206 file = new File(dataFile); in startTrace() 207 if (file.exists() == true) { in startTrace() 208 file.delete(); in startTrace() 211 file = new File(keyFile); in startTrace() 212 if (file.exists() == true) { in startTrace() 213 file.delete(); in startTrace()
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/ |
D | ver4_dict_buffers.cpp | 119 FILE *const file = fdopen(fd, "wb"); in flushHeaderAndDictBuffers() local 120 if (!file) { in flushHeaderAndDictBuffers() 126 if (!flushDictBuffers(file)) { in flushHeaderAndDictBuffers() 127 fclose(file); in flushHeaderAndDictBuffers() 130 fclose(file); in flushHeaderAndDictBuffers() 146 bool Ver4DictBuffers::flushDictBuffers(FILE *const file) const { in flushDictBuffers() 148 if (!DictFileWritingUtils::writeBufferToFileTail(file, &mExpandableTrieBuffer)) { in flushDictBuffers() 153 if (!mTerminalPositionLookupTable.flushToFile(file)) { in flushDictBuffers() 158 if (!mLanguageModelDictContent.save(file)) { in flushDictBuffers() 163 if (!mShortcutDictContent.flushToFile(file)) { in flushDictBuffers()
|
/packages/apps/Messaging/src/com/android/messaging/util/ |
D | FileUtil.java | 79 for (File file : root.listFiles()) { in removeFileOrDirectoryExcept() 80 if (exclude == null || !file.equals(exclude)) { in removeFileOrDirectoryExcept() 81 removeFileOrDirectoryExcept(file, exclude); in removeFileOrDirectoryExcept() 101 for (File file : sourceDir.listFiles()) { in moveAllContentUnderDirectory() 102 if (file.isDirectory()) { in moveAllContentUnderDirectory() 103 final File dirTarget = new File(targetDir, file.getName()); in moveAllContentUnderDirectory() 105 moveAllContentUnderDirectory(file, dirTarget); in moveAllContentUnderDirectory() 108 final File fileTarget = new File(targetDir, file.getName()); in moveAllContentUnderDirectory() 109 Files.move(file, fileTarget); in moveAllContentUnderDirectory()
|
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/util/ |
D | SimpleTempStorage.java | 188 private File file = null; field in SimpleTempStorage.SimpleTempFile 190 private SimpleTempFile(File file) { in SimpleTempFile() argument 191 this.file = file; in SimpleTempFile() 192 this.file.deleteOnExit(); in SimpleTempFile() 199 return new BufferedInputStream(new FileInputStream(file)); in getInputStream() 206 return new BufferedOutputStream(new FileOutputStream(file)); in getOutputStream() 213 return file.getAbsolutePath(); in getAbsolutePath() 234 return file.length(); in length()
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/debug/ |
D | DataExporter.java | 122 private static void removeFileOrDirectory(File file) { in removeFileOrDirectory() argument 123 if (!file.exists()) return; in removeFileOrDirectory() 125 if (file.isFile()) { in removeFileOrDirectory() 126 Log.i(TAG, "Removing " + file); in removeFileOrDirectory() 127 file.delete(); in removeFileOrDirectory() 131 if (file.isDirectory()) { in removeFileOrDirectory() 132 for (File child : file.listFiles()) { in removeFileOrDirectory() 135 Log.i(TAG, "Removing " + file); in removeFileOrDirectory() 136 file.delete(); in removeFileOrDirectory()
|
/packages/inputmethods/LatinIME/tools/dicttool/tests/com/android/inputmethod/latin/dicttool/ |
D | BinaryDictOffdeviceUtilsTests.java | 178 File file = File.createTempFile(dictName, ".tmp"); in runTestHeaderReaderProcessorWithOneSpec() local 179 final DictEncoder dictEncoder = BinaryDictUtils.getDictEncoder(file, formatOptions); in runTestHeaderReaderProcessorWithOneSpec() 183 final File rawFile = file; in runTestHeaderReaderProcessorWithOneSpec() 184 file = File.createTempFile(dictName + ".compress", ".tmp"); in runTestHeaderReaderProcessorWithOneSpec() 186 compressCommand.setArgs(new String[] { rawFile.getPath(), file.getPath() }); in runTestHeaderReaderProcessorWithOneSpec() 190 final File rawFile = file; in runTestHeaderReaderProcessorWithOneSpec() 191 file = File.createTempFile(dictName + ".crypt", ".tmp"); in runTestHeaderReaderProcessorWithOneSpec() 193 cryptCommand.setArgs(new String[] { rawFile.getPath(), file.getPath() }); in runTestHeaderReaderProcessorWithOneSpec() 198 BinaryDictOffdeviceUtils.decodeDictionaryForProcess(file, in runTestHeaderReaderProcessorWithOneSpec() 200 assertNotNull("Can't decode a dictionary we just wrote : " + file, spec); in runTestHeaderReaderProcessorWithOneSpec()
|
/packages/providers/MediaProvider/src/com/android/providers/media/ |
D | MediaUpgradeReceiver.java | 64 String file = files[i]; in onReceive() local 65 if (MediaProvider.isMediaDatabaseName(file)) { in onReceive() 67 Slog.i(TAG, "---> Start upgrade of media database " + file); in onReceive() 71 context, file, MediaProvider.isInternalMediaDatabaseName(file), in onReceive() 75 Log.wtf(TAG, "Error during upgrade of media db " + file, t); in onReceive() 81 Slog.i(TAG, "<--- Finished upgrade of media database " + file in onReceive()
|
/packages/apps/CertInstaller/src/com/android/certinstaller/ |
D | Util.java | 78 static byte[] readFile(File file) { in readFile() argument 80 byte[] data = new byte[(int) file.length()]; in readFile() 81 FileInputStream fis = new FileInputStream(file); in readFile() 91 static boolean deleteFile(File file) { in deleteFile() argument 92 if ((file != null) && !file.delete()) { in deleteFile() 93 Log.w(TAG, "cannot delete cert: " + file); in deleteFile()
|