A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
An iterator that allows traversing over a file's children.
Definition FileHandle.hpp:432
Path to file or directory.
Definition FilePath.hpp:37
Base interface for file handles implementation.
Definition FileHandle.hpp:292
Interface for accessing file systems.
Definition FileSystem.hpp:28
File handle for the local file system.
Definition LocalFileHandle.hpp:21
bool isDirectory() const override
Checks if item is a directory.
bool createSymbolicLink(IFileHandle &dest) override
Creates a symbolic link.
bool createLink(IFileHandle &dest) override
Creates a hard link.
~LocalFileHandle() override
bool createDirectory() override
Creates a new directory.
Int64 getModificationTime() const override
Gets time of last modification.
StringView getPath() const override
bool removeDirectory() override
Removes a directory.
bool isFile() const override
Checks if item is a file.
bool copy(IFileHandle &dest) override
Copies a file.
void updateFileInfo() override
Update file information.
OutputStream createOutputStream(std::ios_base::openmode mode) override
Creates an output stream to write to the file.
bool isSymbolicLink() const override
Checks if item is a symbolic link.
UInt64 getSize() const override
Gets the file size.
IFileSystem * getFileSystem() const override
Gets the backing IFileSystem for the handle.
bool remove() override
Removes a file.
LocalFileHandle(LocalFileSystem &fileSystem, StringView path)
Int64 getAccessTime() const override
Gets the time of last access.
FileIterator begin() const override
Gets an iterator that points to the first directory entry.
bool exists() const override
Checks if the file exists on the file system.
RC< LocalFileSystem > mFileSystem
The file system that created this handle.
Definition LocalFileHandle.hpp:24
FilePath mPath
Path to file or directory.
Definition LocalFileHandle.hpp:27
bool rename(StringView filename) override
Renames a file or directory.
InputStream createInputStream(std::ios_base::openmode mode) const override
Creates an input stream to read from the file.
std::filesystem::path mFileSystemPath
Same as mPath, but in the C++17 std::filesystem format.
Definition LocalFileHandle.hpp:30
LocalFileHandle(LocalFileSystem &fileSystem, String &&path)
bool move(IFileHandle &dest) override
Moves a file.
An implementation of a local file system.
Definition LocalFileSystem.hpp:17
A stream that provides write-only stream functionality.
Definition Stream.hpp:307
Definition Application.hpp:19
std::uint64_t UInt64
Definition DataTypes.hpp:26
std::int64_t Int64
Definition DataTypes.hpp:24
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25