Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: base/files/file.h

Issue 1023103002: Let ImportantFileWriter Use fdatasync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/files/file_posix.cc » ('j') | base/files/file_posix.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file.h
diff --git a/base/files/file.h b/base/files/file.h
index 13c8a96fcefe29ad89112946e705ae86e07790bd..4dcad33af2ccb683bae98f8c430af9552a43cd14 100644
--- a/base/files/file.h
+++ b/base/files/file.h
@@ -253,10 +253,15 @@ class BASE_EXPORT File {
// doesn't exist, |false| is returned.
bool SetLength(int64 length);
- // Instructs the filesystem to flush the file to disk. (POSIX: fsync, Windows:
- // FlushFileBuffers).
+ // Instructs the filesystem to flush the file data and metadata to disk.
+ // (POSIX: fsync, Windows: FlushFileBuffers)
bool Flush();
+ // Instructs the filesystem to flush the file data to disk. Not necessarily
+ // flushes metadata like modification time.
+ // (Linux: fdatasync, other platforms: same as Flush())
rvargas (doing something else) 2015/03/20 18:56:05 I don't think we want to end up with two methods t
hashimoto 2015/03/20 19:38:56 Good point, I thought someone might be relying on
rvargas (doing something else) 2015/03/20 21:43:00 PSA sounds fine.
+ bool FlushData();
+
// Updates the file times.
bool SetTimes(Time last_access_time, Time last_modified_time);
« no previous file with comments | « no previous file | base/files/file_posix.cc » ('j') | base/files/file_posix.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698