diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2023-03-17 15:23:24 +0000 |
---|---|---|
committer | Andrew Kaster <andrewdkaster@gmail.com> | 2023-05-28 05:51:27 -0600 |
commit | da8da79e6206920a6edc1240aaa8d7d11b23fe3d (patch) | |
tree | 17f723fae52aade59de51a30642898184981fcd9 /Userland/Libraries/LibCore/Directory.h | |
parent | c140b67be328ad1e90b03c59bd61c4ce76257381 (diff) | |
download | serenity-da8da79e6206920a6edc1240aaa8d7d11b23fe3d.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibCore/Directory.h')
-rw-r--r-- | Userland/Libraries/LibCore/Directory.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibCore/Directory.h b/Userland/Libraries/LibCore/Directory.h index ec04cc714a..44b1048d19 100644 --- a/Userland/Libraries/LibCore/Directory.h +++ b/Userland/Libraries/LibCore/Directory.h @@ -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; } |