aboutsummaryrefslogtreecommitdiff
path: root/zencore/filesystem.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-09-20 12:08:44 +0200
committerStefan Boberg <[email protected]>2021-09-20 12:08:44 +0200
commit782351959f697fca6b0804c134467b7d9c29da1a (patch)
treefdd6c841a567e69e3d0b45089de70c7e7d0bb756 /zencore/filesystem.cpp
parenttrivial: include cleanup (diff)
downloadzen-782351959f697fca6b0804c134467b7d9c29da1a.tar.xz
zen-782351959f697fca6b0804c134467b7d9c29da1a.zip
Moved more code into zen namespace, for consistency
Also removed snapshot_manifest (remnants of vfs prototype)
Diffstat (limited to 'zencore/filesystem.cpp')
-rw-r--r--zencore/filesystem.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/zencore/filesystem.cpp b/zencore/filesystem.cpp
index 59300b7ad..45e177aaa 100644
--- a/zencore/filesystem.cpp
+++ b/zencore/filesystem.cpp
@@ -406,14 +406,14 @@ WriteFile(std::filesystem::path Path, const IoBuffer* const* Data, size_t Buffer
HRESULT hRes = Outfile.Create(Path.c_str(), GENERIC_WRITE, FILE_SHARE_READ, CREATE_ALWAYS);
if (hRes == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND))
{
- zen::CreateDirectories(Path.parent_path());
+ CreateDirectories(Path.parent_path());
hRes = Outfile.Create(Path.c_str(), GENERIC_WRITE, FILE_SHARE_READ, CREATE_ALWAYS);
}
if (FAILED(hRes))
{
- zen::ThrowSystemException(hRes, "File open failed for '{}'"_format(Path).c_str());
+ ThrowSystemException(hRes, "File open failed for '{}'"_format(Path).c_str());
}
// TODO: this should be block-enlightened
@@ -425,13 +425,13 @@ WriteFile(std::filesystem::path Path, const IoBuffer* const* Data, size_t Buffer
while (WriteSize)
{
- const uint64_t ChunkSize = zen::Min<uint64_t>(WriteSize, uint64_t(2) * 1024 * 1024 * 1024);
+ const uint64_t ChunkSize = Min<uint64_t>(WriteSize, uint64_t(2) * 1024 * 1024 * 1024);
hRes = Outfile.Write(DataPtr, gsl::narrow_cast<uint32_t>(WriteSize));
if (FAILED(hRes))
{
- zen::ThrowSystemException(hRes, "File write failed for '{}'"_format(Path).c_str());
+ ThrowSystemException(hRes, "File write failed for '{}'"_format(Path).c_str());
}
WriteSize -= ChunkSize;
@@ -529,7 +529,7 @@ FileSystemTraversal::TraverseFileSystem(const std::filesystem::path& RootDir, Tr
if (FAILED(hRes))
{
- zen::ThrowSystemException(hRes, "Failed to open handle to volume root");
+ ThrowSystemException(hRes, "Failed to open handle to volume root");
}
while (Continue)