diff options
| author | Dan Engelbrecht <[email protected]> | 2025-10-13 13:32:36 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-10-13 13:32:36 +0200 |
| commit | a6925de9bca8579637fa8a4152ab2b77ef5ca90e (patch) | |
| tree | e2742dcc584e78de7f8921bd655c22929b37da80 /src/zencore | |
| parent | move service common code into base class (#567) (diff) | |
| download | zen-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')
| -rw-r--r-- | src/zencore/filesystem.cpp | 16 | ||||
| -rw-r--r-- | src/zencore/include/zencore/filesystem.h | 8 |
2 files changed, 12 insertions, 12 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; diff --git a/src/zencore/include/zencore/filesystem.h b/src/zencore/include/zencore/filesystem.h index 92b249cec..3bfc3b540 100644 --- a/src/zencore/include/zencore/filesystem.h +++ b/src/zencore/include/zencore/filesystem.h @@ -387,10 +387,10 @@ std::error_code RotateDirectories(const std::filesystem::path& DirectoryName, st std::filesystem::path PickDefaultSystemRootDirectory(); #if ZEN_PLATFORM_WINDOWS -uint32_t GetFileAttributes(const std::filesystem::path& Filename); -uint32_t GetFileAttributes(const std::filesystem::path& Filename, std::error_code& Ec); -void SetFileAttributes(const std::filesystem::path& Filename, uint32_t Attributes); -void SetFileAttributes(const std::filesystem::path& Filename, uint32_t Attributes, std::error_code& Ec); +uint32_t GetFileAttributesFromPath(const std::filesystem::path& Filename); +uint32_t GetFileAttributesFromPath(const std::filesystem::path& Filename, std::error_code& Ec); +void SetFileAttributesToPath(const std::filesystem::path& Filename, uint32_t Attributes); +void SetFileAttributesToPath(const std::filesystem::path& Filename, uint32_t Attributes, std::error_code& Ec); #endif // ZEN_PLATFORM_WINDOWS #if ZEN_PLATFORM_LINUX || ZEN_PLATFORM_MAC |