Base interface for a file in a Filesystem.
More...
#include <GREM/core/system/File.hpp>
|
| struct | Error |
| | Exception type for errors that may arise when attempting to access files through the File API. More...
|
| struct | Metadata |
| | Record of metadata for a specific file. More...
|
|
| | File () noexcept=default |
| | Default constructor.
|
| virtual | ~File ()=default |
| | Virtual destructor.
|
| | File (const File &)=default |
| | Copy constructor.
|
| | File (File &&) noexcept=default |
| | Move constructor.
|
| File & | operator= (const File &)=default |
| | Copy assignment.
|
| File & | operator= (File &&) noexcept=default |
| | Move assignment.
|
| | operator bool () const noexcept |
| | Check if the file handle has an open file associated with it.
|
| virtual void | close ()=0 |
| | Close the associated file so that it can no longer be accessed through this handle, and reset the handle to a closed file handle without an associated file.
|
| virtual bool | isOpen () const noexcept=0 |
| | Check if the file handle has an open file associated with it.
|
|
| static constexpr size_t | npos = static_cast<size_t>(-1) |
| | Invalid value for a file offset, used as an end-of-file marker.
|
Base interface for a file in a Filesystem.
◆ Kind
File entry type.
| Enumerator |
|---|
| REGULAR | Regular file.
|
| DIRECTORY | Directory/folder.
|
| SYMLINK | Symbolic link.
|
| OTHER | Something else, such as a network socket or a device.
|
◆ File() [1/3]
◆ ~File()
| virtual grem::File::~File |
( |
| ) |
|
|
virtualdefault |
Virtual destructor.
Automatically closes the file, ignoring errors.
◆ File() [2/3]
| grem::File::File |
( |
const File & | | ) |
|
|
default |
◆ File() [3/3]
| grem::File::File |
( |
File && | | ) |
|
|
defaultnoexcept |
◆ operator=() [1/2]
| File & grem::File::operator= |
( |
const File & | | ) |
|
|
default |
◆ operator=() [2/2]
| File & grem::File::operator= |
( |
File && | | ) |
|
|
defaultnoexcept |
◆ operator bool()
| grem::File::operator bool |
( |
| ) |
const |
|
inlineexplicitnoexcept |
Check if the file handle has an open file associated with it.
- Returns
- true if there is an associated open file, false otherwise.
◆ close()
| virtual void grem::File::close |
( |
| ) |
|
|
pure virtual |
◆ isOpen()
| virtual bool grem::File::isOpen |
( |
| ) |
const |
|
nodiscardpure virtualnoexcept |
◆ npos
| size_t grem::File::npos = static_cast<size_t>(-1) |
|
staticconstexpr |
Invalid value for a file offset, used as an end-of-file marker.
The documentation for this class was generated from the following file: