diff options
| author | Dan Engelbrecht <[email protected]> | 2025-06-02 19:14:52 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-06-02 19:14:52 +0200 |
| commit | 33d443f5361d007f4971bf0d98585b81ee691437 (patch) | |
| tree | b5814d71a87b5b7a390cc4d94bf84dcdb8f6cd6b /src/zencore/include | |
| parent | fix cachbucket mem hit count (#415) (diff) | |
| download | zen-33d443f5361d007f4971bf0d98585b81ee691437.tar.xz zen-33d443f5361d007f4971bf0d98585b81ee691437.zip | |
http client streaming upload (#413)
- Improvement: Add streaming upload from HttpClient to reduce I/O caused by excessive MMap usage
Diffstat (limited to 'src/zencore/include')
| -rw-r--r-- | src/zencore/include/zencore/filesystem.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/zencore/include/zencore/filesystem.h b/src/zencore/include/zencore/filesystem.h index e62170eba..dfd0eedc9 100644 --- a/src/zencore/include/zencore/filesystem.h +++ b/src/zencore/include/zencore/filesystem.h @@ -102,6 +102,10 @@ ZENCORE_API uint64_t FileSizeFromPath(const std::filesystem::path& Path, std::er */ ZENCORE_API uint64_t FileSizeFromHandle(void* NativeHandle); +/** Query file size from native file handle + */ +ZENCORE_API uint64_t FileSizeFromHandle(void* NativeHandle, std::error_code& Ec); + /** Get a native time tick of last modification time */ ZENCORE_API uint64_t GetModificationTickFromHandle(void* NativeHandle, std::error_code& Ec); @@ -167,6 +171,13 @@ ZENCORE_API void ScanFile(void* NativeHandle, uint64_t Size, uint64_t ChunkSize, std::function<void(const void* Data, size_t Size)>&& ProcessFunc); +ZENCORE_API void WriteFile(void* NativeHandle, + const void* Data, + uint64_t Size, + uint64_t FileOffset, + uint64_t ChunkSize, + std::error_code& Ec); +ZENCORE_API void ReadFile(void* NativeHandle, void* Data, uint64_t Size, uint64_t FileOffset, uint64_t ChunkSize, std::error_code& Ec); struct CopyFileOptions { |