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