36#ifndef FILESYSTEMPERMISSIONS_HPP_
37#define FILESYSTEMPERMISSIONS_HPP_
39#include <system_error>
41#include "FileFinder.hpp"
55 return fs::perms::owner_read | fs::perms::owner_write | fs::perms::group_read;
63 return fs::perms::owner_all | fs::perms::group_read | fs::perms::group_exec
64 | fs::perms::others_read | fs::perms::others_exec;
103 bool created_dir = fs::create_directory(rPath);
120 if (fs::exists(rPath))
125 fs::path parent_path = rPath.parent_path();
126 bool created_parent =
false;
127 if (!parent_path.empty() && parent_path != rPath && !fs::exists(parent_path))
143 fs::copy_file(rFromPath, rToPath);
static bool CreateDirectoriesWithPermissions(const fs::path &rPath)
static void SetDirectoryPermissions(const fs::path &rPath)
static fs::perms GetFilePermissions()
static void CopyFileWithPermissions(const fs::path &rFromPath, const fs::path &rToPath)
static fs::perms GetDirectoryPermissions()
static bool CreateDirectoryWithPermissions(const fs::path &rPath)
static void SetFilePermissions(const fs::path &rPath)