summaryrefslogtreecommitdiffstats
path: root/ppapi/cpp/file_system.h
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi/cpp/file_system.h')
-rw-r--r--ppapi/cpp/file_system.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/ppapi/cpp/file_system.h b/ppapi/cpp/file_system.h
index 9baa78e..96e88c1 100644
--- a/ppapi/cpp/file_system.h
+++ b/ppapi/cpp/file_system.h
@@ -33,6 +33,11 @@ class FileSystem : public Resource {
/// @param[in] other A reference to a <code>FileSystem</code>.
FileSystem(const FileSystem& other);
+ /// Constructs a <code>FileSystem</code> from a <code>Resource</code>.
+ ///
+ /// @param[in] resource A <code>Resource</code> containing a file system.
+ explicit FileSystem(const Resource& resource);
+
/// A constructor used when you have received a PP_Resource as a return
/// value that has already been reference counted.
///
@@ -63,6 +68,14 @@ class FileSystem : public Resource {
///
/// @return An int32_t containing an error code from <code>pp_errors.h</code>.
int32_t Open(int64_t expected_size, const CompletionCallback& cc);
+
+ /// Checks whether a <code>Resource</code> is a file system, to test whether
+ /// it is appropriate for use with the <code>FileSystem</code> constructor.
+ ///
+ /// @param[in] resource A <code>Resource</code> to test.
+ ///
+ /// @return True if <code>resource</code> is a file system.
+ static bool IsFileSystem(const Resource& resource);
};
} // namespace pp