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

Unified Diff: base/file_util.h

Issue 6660001: Getting service process on Mac to handle having things moved/changed underneath it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed up phajdan's comments, got things working properly Created 9 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
Index: base/file_util.h
diff --git a/base/file_util.h b/base/file_util.h
index 108c998ac9c1288371c4d19e30219c0ecd8768a6..cf56d12725be44c4c98e58a7adba5afcf96b534b 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -298,6 +298,19 @@ bool IsDot(const FilePath& path);
// Returns true if the given path's base name is "..".
bool IsDotDot(const FilePath& path);
+#if defined(OS_MACOSX)
+// Returns true if the given path is in the trash.
+bool IsInTrash(const FilePath& path);
+
+// Moves the file to the trash.
Mark Mentovai 2011/03/11 20:13:52 You’ve only used this in a test. Just define the f
+// If |new_path| is not NULL it will contain the new location.
+bool MoveToTrash(const FilePath& path, FilePath* new_path);
+#endif // OS_MACOSX
+
+// Are file path a and file path b referring to the same file object.
+// Does not compare paths, but resolves them and compares the resolved values.
+bool AreReferringToSameObject(const FilePath& a, const FilePath& b);
+
// Sets |real_path| to |path| with symbolic links and junctions expanded.
// On windows, make sure the path starts with a lettered drive.
// |path| must reference a file. Function will fail if |path| points to
@@ -328,7 +341,7 @@ bool SetLastModifiedTime(const FilePath& path,
#if defined(OS_POSIX)
// Store inode number of |path| in |inode|. Return true on success.
-bool GetInode(const FilePath& path, ino_t* inode);
+bool GetInodeAndDevice(const FilePath& path, ino_t* inode, dev_t* dev);
#endif
// Wrapper for fopen-like calls. Returns non-NULL FILE* on success.

Powered by Google App Engine
This is Rietveld 408576698