mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-13 22:47:15 -04:00
Prepare file system abstraction
This commit is contained in:
parent
25fe7107ad
commit
442d6ad1ce
25
kernel/include/file_system.hpp
Normal file
25
kernel/include/file_system.hpp
Normal file
@ -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<std::string>& file_path, std::string& content) = 0;
|
||||
virtual size_t ls(const std::vector<std::string>& file_path, std::vector<disks::file>& contents) = 0;
|
||||
virtual size_t touch(const std::vector<std::string>& file_path) = 0;
|
||||
virtual size_t mkdir(const std::vector<std::string>& file_path) = 0;
|
||||
virtual size_t rm(const std::vector<std::string>& file_path) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -9,13 +9,14 @@
|
||||
#include <string.hpp>
|
||||
#include <algorithms.hpp>
|
||||
|
||||
#include "vfs.hpp"
|
||||
#include "scheduler.hpp"
|
||||
#include "flags.hpp"
|
||||
|
||||
#include <directory_entry.hpp>
|
||||
#include <mount_point.hpp>
|
||||
|
||||
#include "vfs.hpp"
|
||||
#include "scheduler.hpp"
|
||||
#include "file_system.hpp"
|
||||
#include "flags.hpp"
|
||||
|
||||
#include "fat32.hpp"
|
||||
|
||||
#include "disks.hpp"
|
||||
|
Loading…
x
Reference in New Issue
Block a user