aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/filesystem.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-10-13 13:32:36 +0200
committerGitHub Enterprise <[email protected]>2025-10-13 13:32:36 +0200
commita6925de9bca8579637fa8a4152ab2b77ef5ca90e (patch)
treee2742dcc584e78de7f8921bd655c22929b37da80 /src/zencore/filesystem.cpp
parentmove service common code into base class (#567) (diff)
downloadzen-a6925de9bca8579637fa8a4152ab2b77ef5ca90e.tar.xz
zen-a6925de9bca8579637fa8a4152ab2b77ef5ca90e.zip
refactor builds cmd (#566)
Move builds download code from builds_cmd.cpp to remotestorelib
Diffstat (limited to 'src/zencore/filesystem.cpp')
-rw-r--r--src/zencore/filesystem.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/zencore/filesystem.cpp b/src/zencore/filesystem.cpp
index 5ac460fd9..8c5040397 100644
--- a/src/zencore/filesystem.cpp
+++ b/src/zencore/filesystem.cpp
@@ -2917,16 +2917,16 @@ PickDefaultSystemRootDirectory()
#if ZEN_PLATFORM_WINDOWS
uint32_t
-GetFileAttributes(const std::filesystem::path& Filename, std::error_code& Ec)
+GetFileAttributesFromPath(const std::filesystem::path& Filename, std::error_code& Ec)
{
return WinGetFileAttributes(Filename, Ec);
}
uint32_t
-GetFileAttributes(const std::filesystem::path& Filename)
+GetFileAttributesFromPath(const std::filesystem::path& Filename)
{
std::error_code Ec;
- uint32_t Result = zen::GetFileAttributes(Filename, Ec);
+ uint32_t Result = GetFileAttributesFromPath(Filename, Ec);
if (Ec)
{
throw std::system_error(Ec, fmt::format("failed to get attributes of file '{}'", Filename.string()));
@@ -2935,7 +2935,7 @@ GetFileAttributes(const std::filesystem::path& Filename)
}
void
-SetFileAttributes(const std::filesystem::path& Filename, uint32_t Attributes, std::error_code& Ec)
+SetFileAttributesToPath(const std::filesystem::path& Filename, uint32_t Attributes, std::error_code& Ec)
{
if (::SetFileAttributes(Filename.native().c_str(), Attributes) == 0)
{
@@ -2944,10 +2944,10 @@ SetFileAttributes(const std::filesystem::path& Filename, uint32_t Attributes, st
}
void
-SetFileAttributes(const std::filesystem::path& Filename, uint32_t Attributes)
+SetFileAttributesToPath(const std::filesystem::path& Filename, uint32_t Attributes)
{
std::error_code Ec;
- zen::SetFileAttributes(Filename, Attributes, Ec);
+ zen::SetFileAttributesToPath(Filename, Attributes, Ec);
if (Ec)
{
throw std::system_error(Ec, fmt::format("failed to set attributes of file {}", Filename.string()));
@@ -3010,7 +3010,7 @@ bool
SetFileReadOnly(const std::filesystem::path& Filename, bool ReadOnly, std::error_code& Ec)
{
#if ZEN_PLATFORM_WINDOWS
- uint32_t CurrentAttributes = GetFileAttributes(Filename, Ec);
+ uint32_t CurrentAttributes = GetFileAttributesFromPath(Filename, Ec);
if (Ec)
{
return false;
@@ -3023,7 +3023,7 @@ SetFileReadOnly(const std::filesystem::path& Filename, bool ReadOnly, std::error
uint32_t NewAttributes = MakeFileAttributeReadOnly(CurrentAttributes, ReadOnly);
if (CurrentAttributes != NewAttributes)
{
- SetFileAttributes(Filename, NewAttributes, Ec);
+ SetFileAttributesToPath(Filename, NewAttributes, Ec);
if (Ec)
{
return false;