2023-06-23 02:28:14 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "orbis/error/SysResult.hpp"
|
2023-07-29 18:53:34 +02:00
|
|
|
#include "orbis/file.hpp"
|
2023-06-23 02:28:14 +02:00
|
|
|
#include "orbis/utils/Rc.hpp"
|
|
|
|
|
#include <filesystem>
|
|
|
|
|
|
|
|
|
|
struct IoDevice;
|
|
|
|
|
|
|
|
|
|
namespace rx::vfs {
|
2023-10-31 19:28:40 +01:00
|
|
|
void fork();
|
2023-06-23 02:28:14 +02:00
|
|
|
void initialize();
|
|
|
|
|
void deinitialize();
|
2023-10-29 10:30:37 +01:00
|
|
|
void addDevice(std::string name, IoDevice *device);
|
2023-12-31 12:30:49 +01:00
|
|
|
std::pair<orbis::Ref<IoDevice>, std::string>
|
|
|
|
|
get(const std::filesystem::path &guestPath);
|
2023-06-23 02:28:14 +02:00
|
|
|
orbis::SysResult mount(const std::filesystem::path &guestPath, IoDevice *dev);
|
|
|
|
|
orbis::SysResult open(std::string_view path, int flags, int mode,
|
2023-07-29 21:46:28 +02:00
|
|
|
orbis::Ref<orbis::File> *file, orbis::Thread *thread);
|
2024-08-31 22:23:11 +02:00
|
|
|
bool exists(std::string_view path, orbis::Thread *thread);
|
2023-10-29 10:30:37 +01:00
|
|
|
orbis::SysResult mkdir(std::string_view path, int mode, orbis::Thread *thread);
|
|
|
|
|
orbis::SysResult rmdir(std::string_view path, orbis::Thread *thread);
|
2023-11-11 15:52:27 +01:00
|
|
|
orbis::SysResult rename(std::string_view from, std::string_view to,
|
|
|
|
|
orbis::Thread *thread);
|
|
|
|
|
orbis::ErrorCode unlink(std::string_view path, orbis::Thread *thread);
|
|
|
|
|
orbis::ErrorCode unlinkAll(std::string_view path, orbis::Thread *thread);
|
|
|
|
|
orbis::ErrorCode createSymlink(std::string_view target,
|
|
|
|
|
std::string_view linkPath,
|
|
|
|
|
orbis::Thread *thread);
|
2023-07-06 18:16:25 +02:00
|
|
|
} // namespace rx::vfs
|