|
|
@@ -33,6 +33,8 @@ OTHER DEALINGS IN THE SOFTWARE.
|
|
|
namespace crown
|
|
|
{
|
|
|
|
|
|
+/// @defgroup Filesystem Filesystem
|
|
|
+
|
|
|
/// Provides a platform-independent way to access files and directories
|
|
|
/// on the host filesystem.
|
|
|
///
|
|
|
@@ -78,6 +80,8 @@ namespace crown
|
|
|
/// 1) data/textures/grass.texture
|
|
|
/// 2) grass.texture
|
|
|
/// 3) foo/bar
|
|
|
+///
|
|
|
+/// @ingroup Filesystem
|
|
|
class Filesystem
|
|
|
{
|
|
|
public:
|
|
|
@@ -86,31 +90,31 @@ public:
|
|
|
virtual ~Filesystem() {};
|
|
|
|
|
|
/// Opens the file at the given @a path with the given @a mode.
|
|
|
- virtual File* open(const char* path, FileOpenMode mode) = 0;
|
|
|
+ virtual File* open(const char* path, FileOpenMode mode) = 0;
|
|
|
|
|
|
/// Closes the given @a file.
|
|
|
- virtual void close(File* file) = 0;
|
|
|
+ virtual void close(File* file) = 0;
|
|
|
|
|
|
/// Returns true if @a path is a directory.
|
|
|
- virtual bool is_directory(const char* path) = 0;
|
|
|
+ virtual bool is_directory(const char* path) = 0;
|
|
|
|
|
|
/// Returns true if @a path is a regular file.
|
|
|
- virtual bool is_file(const char* path) = 0;
|
|
|
+ virtual bool is_file(const char* path) = 0;
|
|
|
|
|
|
/// Creates the directory at the given @a path.
|
|
|
- virtual void create_directory(const char* path) = 0;
|
|
|
+ virtual void create_directory(const char* path) = 0;
|
|
|
|
|
|
/// Deletes the directory at the given @a path.
|
|
|
- virtual void delete_directory(const char* path) = 0;
|
|
|
+ virtual void delete_directory(const char* path) = 0;
|
|
|
|
|
|
/// Creates the file at the given @a path.
|
|
|
- virtual void create_file(const char* path) = 0;
|
|
|
+ virtual void create_file(const char* path) = 0;
|
|
|
|
|
|
/// Deletes the file at the given @a path.
|
|
|
- virtual void delete_file(const char* path) = 0;
|
|
|
+ virtual void delete_file(const char* path) = 0;
|
|
|
|
|
|
/// Returns the relative file names in the given @a path.
|
|
|
- virtual void list_files(const char* path, Vector<DynamicString>& files) = 0;
|
|
|
+ virtual void list_files(const char* path, Vector<DynamicString>& files) = 0;
|
|
|
|
|
|
/// Returns the absolute path of the given @a path based on
|
|
|
/// the root path of the file source. If @a path is absolute,
|
|
|
@@ -120,8 +124,8 @@ public:
|
|
|
private:
|
|
|
|
|
|
// Disable copying
|
|
|
- Filesystem(const Filesystem&);
|
|
|
- Filesystem& operator=(const Filesystem&);
|
|
|
+ Filesystem(const Filesystem&);
|
|
|
+ Filesystem& operator=(const Filesystem&);
|
|
|
};
|
|
|
|
|
|
} // namespace crown
|