aboutsummaryrefslogtreecommitdiff
path: root/kapi
diff options
context:
space:
mode:
Diffstat (limited to 'kapi')
-rw-r--r--kapi/kapi/filesystem.hpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/kapi/kapi/filesystem.hpp b/kapi/kapi/filesystem.hpp
index 5346a96d..1656a17f 100644
--- a/kapi/kapi/filesystem.hpp
+++ b/kapi/kapi/filesystem.hpp
@@ -1,6 +1,7 @@
#ifndef TEACHOS_KAPI_FILESYSTEM_HPP
#define TEACHOS_KAPI_FILESYSTEM_HPP
+#include <kstd/result.hpp>
#include <kstd/system_error.hpp>
#include <cstddef>
@@ -69,6 +70,23 @@ namespace kapi::filesystem
@qualifier kernel-defined
*/
auto write(size_t file_descriptor, void const * buffer, size_t size) -> std::expected<std::size_t, kstd::error_code>;
+
+ /**
+ @brief Creates a new directory at the specified @p path.
+ @param path The path where the new directory should be created.
+ @return 0 on success, -1 on failure.
+ @qualifier kernel-defined
+ */
+ auto mkdir(std::string_view path) -> kstd::result<void>;
+
+ /**
+ @brief Creates a new file at the specified @p path.
+ @param path The path where the new file should be created.
+ @return 0 on success, -1 on failure.
+ @qualifier kernel-defined
+ */
+ // TODO remove again after the open method supports an optional create flag
+ auto create(std::string_view path) -> kstd::result<void>;
} // namespace kapi::filesystem
#endif // TEACHOS_KAPI_FILESYSTEM_HPP \ No newline at end of file