updated build system
This commit is contained in:
@@ -96,9 +96,7 @@ auto traverse_directory(
|
||||
namespace repertory::utils::file {
|
||||
auto directory::copy_to(std::string_view new_path,
|
||||
bool overwrite) const -> bool {
|
||||
static constexpr const std::string_view function_name{
|
||||
static_cast<const char *>(__FUNCTION__),
|
||||
};
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
try {
|
||||
throw std::runtime_error("failed to copy directory|" + path_ + '|' +
|
||||
@@ -114,9 +112,7 @@ auto directory::copy_to(std::string_view new_path,
|
||||
}
|
||||
|
||||
auto directory::count(bool recursive) const -> std::uint64_t {
|
||||
static constexpr const std::string_view function_name{
|
||||
static_cast<const char *>(__FUNCTION__),
|
||||
};
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
try {
|
||||
std::uint64_t ret{0U};
|
||||
@@ -149,9 +145,7 @@ auto directory::count(bool recursive) const -> std::uint64_t {
|
||||
|
||||
auto directory::create_directory(std::string_view path) const
|
||||
-> fs_directory_t {
|
||||
static constexpr const std::string_view function_name{
|
||||
static_cast<const char *>(__FUNCTION__),
|
||||
};
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
try {
|
||||
auto abs_path = utils::path::combine(path_, {path});
|
||||
@@ -208,9 +202,7 @@ auto directory::exists() const -> bool {
|
||||
}
|
||||
|
||||
auto directory::get_directory(std::string_view path) const -> fs_directory_t {
|
||||
static constexpr const std::string_view function_name{
|
||||
static_cast<const char *>(__FUNCTION__),
|
||||
};
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
try {
|
||||
auto dir_path = utils::path::combine(path_, {path});
|
||||
@@ -229,9 +221,7 @@ auto directory::get_directory(std::string_view path) const -> fs_directory_t {
|
||||
}
|
||||
|
||||
auto directory::get_directories() const -> std::vector<fs_directory_t> {
|
||||
static constexpr const std::string_view function_name{
|
||||
static_cast<const char *>(__FUNCTION__),
|
||||
};
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
try {
|
||||
std::vector<fs_directory_t> ret{};
|
||||
@@ -259,9 +249,7 @@ auto directory::get_directories() const -> std::vector<fs_directory_t> {
|
||||
|
||||
auto directory::create_file(std::string_view file_name,
|
||||
bool read_only) const -> fs_file_t {
|
||||
static constexpr const std::string_view function_name{
|
||||
static_cast<const char *>(__FUNCTION__),
|
||||
};
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
try {
|
||||
auto file_path = utils::path::combine(path_, {file_name});
|
||||
@@ -276,9 +264,7 @@ auto directory::create_file(std::string_view file_name,
|
||||
}
|
||||
|
||||
auto directory::get_file(std::string_view path) const -> fs_file_t {
|
||||
static constexpr const std::string_view function_name{
|
||||
static_cast<const char *>(__FUNCTION__),
|
||||
};
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
try {
|
||||
auto file_path = utils::path::combine(path_, {path});
|
||||
@@ -295,9 +281,7 @@ auto directory::get_file(std::string_view path) const -> fs_file_t {
|
||||
}
|
||||
|
||||
auto directory::get_files() const -> std::vector<fs_file_t> {
|
||||
static constexpr const std::string_view function_name{
|
||||
static_cast<const char *>(__FUNCTION__),
|
||||
};
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
try {
|
||||
std::vector<fs_file_t> ret{};
|
||||
@@ -323,9 +307,7 @@ auto directory::get_files() const -> std::vector<fs_file_t> {
|
||||
}
|
||||
|
||||
auto directory::get_items() const -> std::vector<fs_item_t> {
|
||||
static constexpr const std::string_view function_name{
|
||||
static_cast<const char *>(__FUNCTION__),
|
||||
};
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
try {
|
||||
std::vector<fs_item_t> ret{};
|
||||
@@ -361,9 +343,7 @@ auto directory::is_stop_requested() const -> bool {
|
||||
}
|
||||
|
||||
auto directory::is_symlink() const -> bool {
|
||||
static constexpr const std::string_view function_name{
|
||||
static_cast<const char *>(__FUNCTION__),
|
||||
};
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
try {
|
||||
return std::filesystem::is_symlink(path_);
|
||||
@@ -377,9 +357,7 @@ auto directory::is_symlink() const -> bool {
|
||||
}
|
||||
|
||||
auto directory::move_to(std::string_view new_path) -> bool {
|
||||
static constexpr const std::string_view function_name{
|
||||
static_cast<const char *>(__FUNCTION__),
|
||||
};
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
try {
|
||||
throw std::runtime_error("failed to move directory|" + path_ + '|' +
|
||||
@@ -394,9 +372,7 @@ auto directory::move_to(std::string_view new_path) -> bool {
|
||||
}
|
||||
|
||||
auto directory::remove() -> bool {
|
||||
static constexpr const std::string_view function_name{
|
||||
static_cast<const char *>(__FUNCTION__),
|
||||
};
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
if (not exists()) {
|
||||
return true;
|
||||
@@ -420,9 +396,7 @@ auto directory::remove() -> bool {
|
||||
}
|
||||
|
||||
auto directory::remove_recursively() -> bool {
|
||||
static constexpr const std::string_view function_name{
|
||||
static_cast<const char *>(__FUNCTION__),
|
||||
};
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
try {
|
||||
if (not exists()) {
|
||||
@@ -448,9 +422,7 @@ auto directory::remove_recursively() -> bool {
|
||||
}
|
||||
|
||||
auto directory::size(bool recursive) const -> std::uint64_t {
|
||||
static constexpr const std::string_view function_name{
|
||||
static_cast<const char *>(__FUNCTION__),
|
||||
};
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
try {
|
||||
std::uint64_t ret{0U};
|
||||
|
||||
Reference in New Issue
Block a user