diff options
Diffstat (limited to 'WebCore/platform/AsyncFileSystem.h')
-rw-r--r-- | WebCore/platform/AsyncFileSystem.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/WebCore/platform/AsyncFileSystem.h b/WebCore/platform/AsyncFileSystem.h index 1bf7580..3104ebc 100644 --- a/WebCore/platform/AsyncFileSystem.h +++ b/WebCore/platform/AsyncFileSystem.h @@ -59,6 +59,10 @@ public: static bool isAvailable(); + // Subclass must implement this if it supports synchronous operations. + // This should return false if there are no pending operations. + virtual bool waitForOperationToComplete() { return false; } + // Creates and returns a new platform-specific AsyncFileSystem instance if the platform has its own implementation. static PassOwnPtr<AsyncFileSystem> create(const String& rootPath); @@ -76,10 +80,16 @@ public: virtual void copy(const String& srcPath, const String& destPath, PassOwnPtr<AsyncFileSystemCallbacks>) = 0; // Deletes a file or directory at a given path. + // It is an error to try to remove a directory that is not empty. // AsyncFileSystemCallbacks::didSucceed() is called when the operation is completed successfully. // AsyncFileSystemCallbacks::didFail() is called otherwise. virtual void remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0; + // Recursively deletes a directory at a given path. + // AsyncFileSystemCallbacks::didSucceed() is called when the operation is completed successfully. + // AsyncFileSystemCallbacks::didFail() is called otherwise. + virtual void removeRecursively(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>) = 0; + // Retrieves the metadata information of the file or directory at a given path. // AsyncFileSystemCallbacks::didReadMetadata() is called when the operation is completed successfully. // AsyncFileSystemCallbacks::didFail() is called otherwise. |