From ad01db9274e982dcd63171b32eb1f5cc800b6fab Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 17 Aug 2026 18:41:52 +0200 Subject: chore: replace expected by result --- kapi/kapi/filesystem.hpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'kapi') diff --git a/kapi/kapi/filesystem.hpp b/kapi/kapi/filesystem.hpp index da72f523..956dc116 100644 --- a/kapi/kapi/filesystem.hpp +++ b/kapi/kapi/filesystem.hpp @@ -13,7 +13,6 @@ #include #include -#include #include #include @@ -33,40 +32,39 @@ namespace kapi::filesystem //! @param source The source device or filesystem to mount. //! @param target The target mount point. //! @return Nothing on success, an error code otherwise. - auto mount(std::string_view source, std::string_view target) -> std::expected; + auto mount(std::string_view source, std::string_view target) -> kstd::result; //! Unmount a filesystem from the specified target path. //! //! @param target The target mount point to unmount. //! @return Nothing on success, an error code otherwise. - auto umount(std::string_view target) -> std::expected; + auto umount(std::string_view target) -> kstd::result; //! Open a file at the specified path. //! //! @param path The path to the file to open. //! @return A file descriptor on success, an error code otherwise. - auto open(std::string_view path) -> std::expected; + auto open(std::string_view path) -> kstd::result; //! Close a file descriptor. //! //! @param file_descriptor The file descriptor to close. //! @return Nothing on success, an error code otherwise . - auto close(size_t file_descriptor) -> std::expected; + auto close(size_t file_descriptor) -> kstd::result; //! Read bytes from a file into a given buffer. //! //! @param file_descriptor The file descriptor to read from. //! @param buffer The buffer to store the read data. //! @return The number of bytes read on success, an error code otherwise. - auto read(size_t file_descriptor, std::span buffer) -> std::expected; + auto read(size_t file_descriptor, std::span buffer) -> kstd::result; //! Write bytes from a given buffer to a file descriptor. //! //! @param file_descriptor The file descriptor to write to. //! @param buffer The buffer containing the data to write. //! @return The number of bytes written on success, an error code otherwise. - auto write(size_t file_descriptor, std::span buffer) - -> std::expected; + auto write(size_t file_descriptor, std::span buffer) -> kstd::result; //! Create a new directory at the specified path. //! -- cgit v1.2.3