Lines Matching refs:file

5  * you may not use this file except in compliance with the License.
85 // TODO: This implementation currently uses one file per entry, which is
86 // inefficient for smallish entries -- consider using a single queue file
351 final File file = entry.getFile(mDropBoxDir);
354 entry.tag, entry.timestampMillis, file, entry.flags);
356 Slog.wtf(TAG, "Can't read: " + file, e);
357 // Continue to next file
383 } else if (args[i].equals("-f") || args[i].equals("--file")) {
387 pw.println(" [-h|--help] [-p|--print] [-f|--file] [timestamp]");
390 pw.println(" -f|--file: print path of each entry's file");
426 final File file = entry.getFile(mDropBoxDir);
427 if (file == null) {
428 out.append(" (no file)\n");
437 out.append(", ").append(file.length()).append(" bytes)\n");
442 out.append(file.getPath()).append("\n");
450 entry.tag, entry.timestampMillis, file, entry.flags);
483 Slog.e(TAG, "Can't read: " + file, e);
502 out.append("Usage: dumpsys dropbox [--print|--file] [YYYY-mm-dd] [HH:MM:SS] [tag]\n");
527 * Metadata describing an on-disk log file.
555 * Moves an existing temporary file to a new log filename.
557 * @param temp file to rename
558 * @param dir to store file in
559 * @param tag to use for new log file name
563 * @throws IOException if the file can't be moved
573 final File file = this.getFile(dir);
574 if (!temp.renameTo(file)) {
575 throw new IOException("Can't rename " + temp + " to " + file);
577 this.blocks = (int) ((file.length() + blockSize - 1) / blockSize);
581 * Creates a zero-length tombstone for a file whose contents were lost.
583 * @param dir to store file in
584 * @param tag to use for new log file name
586 * @throws IOException if the file can't be created.
600 * {@link #hasFile()} would return false on, and also remove the file.
602 * @param file name of existing log file
605 public EntryFile(File file, int blockSize) {
609 String name = file.getName();
643 Slog.wtf(TAG, "Invalid filename: " + file);
645 // Remove the file and return an empty instance.
646 file.delete();
654 this.blocks = (int) ((file.length() + blockSize - 1) / blockSize);
672 * @return whether an entry actually has a backing file, or it's an empty "tombstone"
705 * If an entry has a backing file, remove it.
738 for (File file : files) {
739 if (file.getName().endsWith(".tmp")) {
740 Slog.i(TAG, "Cleaning temp file: " + file);
741 file.delete();
745 EntryFile entry = new EntryFile(file, mBlockSize);
749 // has removed the file already.
756 /** Adds a disk log file to in-memory tracking for accounting and enumeration. */
775 /** Moves a temporary file to a final log filename and enrolls it. */
910 Slog.e(TAG, "Can't write tombstone file", e);