Luna/libos/include/os/FileSystem.h
apio 3eb78aa5f3
All checks were successful
continuous-integration/drone/push Build is passing
libos+init: Add a new Path class to handle both file descriptors and file paths
2023-05-03 17:37:26 +02:00

27 lines
565 B
C++

#pragma once
#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> 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);
}
}