-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIPathByteSource.h
More file actions
26 lines (21 loc) · 855 Bytes
/
Copy pathIPathByteSource.h
File metadata and controls
26 lines (21 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once
#include <cstdint>
#include <string>
#include <vector>
namespace ImageCore
{
// Host-provided byte source for filesystem and archive-backed paths.
// ImageCore stays free of Floar/VFS dependencies; the app installs an adapter.
class IPathByteSource
{
public:
virtual ~IPathByteSource() = default;
// Resolve a display path to the host/archive file path used for volume queries.
// When the source cannot parse the path, return path unchanged.
virtual std::wstring ResolveHostPath(const std::wstring& path) const = 0;
// Read the entire file (disk or archive entry). Empty vector on failure.
virtual std::vector<uint8_t> ReadAll(const std::wstring& path) const = 0;
};
void SetPathByteSource(IPathByteSource* source);
IPathByteSource* GetPathByteSource();
}