diff --git a/kernel/include/file_system.hpp b/kernel/include/file_system.hpp new file mode 100644 index 00000000..6236ae04 --- /dev/null +++ b/kernel/include/file_system.hpp @@ -0,0 +1,25 @@ +//======================================================================= +// Copyright Baptiste Wicht 2013-2014. +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef FILE_SYSTEM_H +#define FILE_SYSTEM_H + +#include "disks.hpp" + +namespace vfs { + +struct file_system { + virtual size_t read(const std::vector& file_path, std::string& content) = 0; + virtual size_t ls(const std::vector& file_path, std::vector& contents) = 0; + virtual size_t touch(const std::vector& file_path) = 0; + virtual size_t mkdir(const std::vector& file_path) = 0; + virtual size_t rm(const std::vector& file_path) = 0; +}; + +} + +#endif diff --git a/kernel/src/vfs.cpp b/kernel/src/vfs.cpp index 96e983e0..f058c8e9 100644 --- a/kernel/src/vfs.cpp +++ b/kernel/src/vfs.cpp @@ -9,13 +9,14 @@ #include #include -#include "vfs.hpp" -#include "scheduler.hpp" -#include "flags.hpp" - #include #include +#include "vfs.hpp" +#include "scheduler.hpp" +#include "file_system.hpp" +#include "flags.hpp" + #include "fat32.hpp" #include "disks.hpp"