Luna/libos/include/os/FileSystem.h
apio d56e8baca5
All checks were successful
continuous-integration/drone/push Build is passing
libos+rm: Add recursive removal of directories
2023-04-19 18:20:44 +02:00

28 lines
664 B
C++

#pragma once
#include <luna/Result.h>
#include <luna/StringView.h>
#include <sys/types.h>
namespace os
{
namespace FileSystem
{
bool exists(StringView path);
bool is_directory(StringView path);
Result<void> create_directory(StringView path, mode_t mode);
Result<void> remove(StringView path);
Result<void> removeat(int dirfd, StringView path);
Result<void> remove_tree(StringView path);
Result<void> remove_tree_at(int dirfd, StringView path);
Result<String> working_directory();
Result<String> home_directory();
Result<void> change_directory(StringView path);
}
}