Lines Matching refs:file
5 * use this file except in compliance with the License. You may obtain a copy
36 public static long parseBeginTime(AtomicFile file) {
37 return parseBeginTime(file.getBaseFile());
40 public static long parseBeginTime(File file) {
41 String name = file.getName();
44 // would be appended more than once to a checked-in file, causing a crash
53 public static void read(AtomicFile file, IntervalStats statsOut) throws IOException {
55 FileInputStream in = file.openRead();
57 statsOut.beginTime = parseBeginTime(file);
59 statsOut.lastTimeSaved = file.getLastModifiedTime();
73 public static void write(AtomicFile file, IntervalStats stats) throws IOException {
74 FileOutputStream fos = file.startWrite();
77 file.finishWrite(fos);
81 file.failWrite(fos);