Death::IO::PakFile class

Provides read-only access to contents of .pak file.

Public types

class Directory
Handles directory traversal, should be used as iterator.

Constructors, destructors, conversion operators

PakFile(Containers::StringView path) explicit
PakFile(const PakFile&) deleted
operator bool() const explicit

Public functions

auto operator=(const PakFile&) -> PakFile& deleted
auto GetMountPoint() const -> Containers::StringView
Returns mount point for the container.
auto GetPath() const -> Containers::StringView
Returns path of the .pak file.
auto IsValid() const -> bool
auto FileExists(Containers::StringView path) -> bool
Returns true if the specified path is a file.
auto FileExists(std::uint64_t hashedPath) -> bool
auto DirectoryExists(Containers::StringView path) -> bool
Returns true if the specified path is a directory.
auto OpenFile(Containers::StringView path, std::int32_t bufferSize = FileStream::DefaultBufferSize) -> std::unique_ptr<Stream>
Opens a file stream.
auto OpenFile(std::uint64_t hashedPath, std::int32_t bufferSize = FileStream::DefaultBufferSize) -> std::unique_ptr<Stream>

Function documentation

bool Death::IO::PakFile::FileExists(std::uint64_t hashedPath)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

std::unique_ptr<Stream> Death::IO::PakFile::OpenFile(std::uint64_t hashedPath, std::int32_t bufferSize = FileStream::DefaultBufferSize)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.