1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:37:34 +00:00

LibCore: Add wrapper for fstatat()

`Core::System::fstatat()` is similar to our standard `Core::System`
wrappers.

`Core::Directory::stat(relative_path, flags)` is a convenience method if
you already have a Directory, to stat a file relative to it.
This commit is contained in:
Sam Atkins 2023-03-17 15:23:24 +00:00 committed by Andrew Kaster
parent c140b67be3
commit da8da79e62
4 changed files with 24 additions and 1 deletions

View file

@ -41,6 +41,7 @@ public:
static ErrorOr<Directory> adopt_fd(int fd, LexicalPath path);
ErrorOr<NonnullOwnPtr<File>> open(StringView filename, File::OpenMode mode) const;
ErrorOr<struct stat> stat(StringView filename, int flags) const;
ErrorOr<struct stat> stat() const;
int fd() const { return m_directory_fd; }