summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2016-12-24 12:46:04 +0100
committerFelix Morgner <felix.morgner@gmail.com>2016-12-24 12:46:04 +0100
commit9b02e03c2a6f8a74a83dd40c69719fe36f4dd154 (patch)
tree2994ed54fcc532b035f38afa39b13556556ebf7c /include
parent31bb7fd29bca88f86860bdc8aa7f09c3e8e3f111 (diff)
downloadextfs-9b02e03c2a6f8a74a83dd40c69719fe36f4dd154.tar.xz
extfs-9b02e03c2a6f8a74a83dd40c69719fe36f4dd154.zip
Update documentation
Diffstat (limited to 'include')
-rw-r--r--include/fs/extfs.hpp31
1 files changed, 26 insertions, 5 deletions
diff --git a/include/fs/extfs.hpp b/include/fs/extfs.hpp
index 0075572..6430fe2 100644
--- a/include/fs/extfs.hpp
+++ b/include/fs/extfs.hpp
@@ -9,27 +9,48 @@
namespace fs
{
+ /**
+ * @brief The ext* file system
+ *
+ * This abstraction provides a top-level interface to an ext* family file system. It grants access to information like the
+ * size of the file system, the space left on the file system as well as the label.
+ *
+ * @since 1.0
+ */
struct extfs
{
+ /**
+ * @brief How to open the file system
+ *
+ * @since 1.0
+ */
enum struct mode : char
{
- read_only,
- writeable
+ read_only, ///< Open in read-only mode
+ writeable, ///< Open in read-write mode
};
/**
- * Open the filesystem at a given path
+ * @brief Open the filesystem at a given path
*
* @param path The path to a device/file containing an ext* file system.
* @param openMode Whether to open the file system in read_only or writeable mode.
+ *
* @since 1.0
+ *
+ * @note This call will also succeed if the file system could not be opened for some reason. To check whether the file
+ * system was successfully opened, see #fs::extfs::open().
*/
explicit extfs(std::string const & path, mode const openMode = mode::read_only);
/**
- * Check if the filesystem is valid
+ * @brief Check if the filesystem is open.
+ *
+ * @return @p true, iff. the file system is opened, @p false otherwise
+ *
+ * @since 1.0
*/
- operator bool() const;
+ bool open() const;
private:
std::fstream m_stream{};