diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-07-15 09:27:43 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-07-15 09:27:43 +0200 |
| commit | d7ad126367675fb50276f96db760dd1af8332352 (patch) | |
| tree | ffa17592e4eff7ad60d3d8e05c54496590ce98c6 /kapi | |
| parent | d6735726d9cc6e98142e94001250076592279d36 (diff) | |
| parent | 8170017c8fcea4b9047c7a1d586bb82473c1eed5 (diff) | |
| download | kernel-d7ad126367675fb50276f96db760dd1af8332352.tar.xz kernel-d7ad126367675fb50276f96db760dd1af8332352.zip | |
Merge branch 'experimental/ext2-write-support' into 'develop'
ext2: add basic write support
See merge request teachos/kernel!55
Diffstat (limited to 'kapi')
| -rw-r--r-- | kapi/kapi/filesystem.hpp | 18 |
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 |
