Index: base/files/file_path_watcher.h |
diff --git a/base/files/file_path_watcher.h b/base/files/file_path_watcher.h |
index 367be9435e9c952b7865b8f0aab3f479eeb6963e..76f000e10f01f9563501a38bd2c5415512279464 100644 |
--- a/base/files/file_path_watcher.h |
+++ b/base/files/file_path_watcher.h |
@@ -59,6 +59,7 @@ class BASE_EXPORT FilePathWatcher { |
// Start watching for the given |path| and notify |delegate| about changes. |
virtual bool Watch(const FilePath& path, |
+ bool recursive, |
Delegate* delegate) WARN_UNUSED_RESULT = 0; |
// Stop watching. This is called from FilePathWatcher's dtor in order to |
@@ -119,9 +120,13 @@ class BASE_EXPORT FilePathWatcher { |
WARN_UNUSED_RESULT; |
// Invokes |callback| whenever updates to |path| are detected. This should be |
- // called at most once, and from a MessageLoop of TYPE_IO. The callback will |
- // be invoked on the same loop. Returns true on success. |
- bool Watch(const FilePath& path, const Callback& callback); |
+ // called at most once, and from a MessageLoop of TYPE_IO. Set |recursive| to |
+ // true, to watch |path| and its children. The callback will be invoked on |
+ // the same loop. Returns true on success. |
+ // |
+ // NOTE: Recursive watch is not supported on all platforms. Watch() will |
Lei Zhang
2012/12/03 21:44:39
Does it work on network shared on Windows? This ma
kmadhusu
2012/12/03 22:54:57
On Windows, notifications may not be returned when
Lei Zhang
2012/12/03 23:16:20
No, we should go into such details here, but I'm c
kmadhusu
2012/12/04 00:06:36
Rephrased the comment. Let me know your comments.
|
+ // return false on those platforms that don't support it. |
+ bool Watch(const FilePath& path, bool recursive, const Callback& callback); |
private: |
scoped_refptr<PlatformDelegate> impl_; |