Luna/libos/include/os/FileSystem.h
apio 300d68088b
All checks were successful
continuous-integration/drone/push Build is passing
libos: Add FileSystem::stat()
2023-05-12 23:47:20 +02:00

30 lines
658 B
C++

#pragma once
#include <bits/struct_stat.h>
#include <luna/Result.h>
#include <luna/StringView.h>
#include <os/Path.h>
#include <sys/types.h>
namespace os
{
namespace FileSystem
{
bool exists(const Path& path);
bool is_directory(const Path& path);
Result<void> stat(const Path& path, struct stat& st);
Result<void> create_directory(StringView path, mode_t mode);
Result<void> remove(const Path& path);
Result<void> remove_tree(const Path& path);
Result<String> working_directory();
Result<String> home_directory();
Result<void> change_directory(StringView path);
}
}