3#include "../core/sizable.hpp"
4#include "../core/string.hpp"
11#error file::info is incompatible with this OS! Please create a pull request or open an issue on GitHub.
28 struct _stat fileStat;
80 size_t size() const noexcept override;
94 mode_t
mode() const noexcept;
An interface for getting an object's size.
Definition sizable.hpp:13
A class to allow a platform-independent way to get information on a file.
Definition info.hpp:26
time_t modified() const noexcept
Get the time that the file was last modified.
bool directory() const noexcept
Check if this file is a directory.
int device() const noexcept
Get the number of the device where the file is stored.
bool regular() const noexcept
Check if this file is a regular file.
bool exists() const noexcept
Get whether the file object exists and can be accessed.
time_t changed() const noexcept
Get the time that the file's status was last changed.
bool symlink() const noexcept
Check if this file is a symbolic link.
size_t size() const noexcept override
Get the size of the file.
mode_t mode() const noexcept
Get the mode (permissions) of the file.
time_t accessed() const noexcept
Get the time that the file was last accessed.
info(const zpath &path) noexcept
Constructor with file path.
zpath path(const zpath &filePath) noexcept
Get the full file path from a relative path.