mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:17:44 +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:
parent
c140b67be3
commit
da8da79e62
4 changed files with 24 additions and 1 deletions
|
@ -88,6 +88,11 @@ ErrorOr<NonnullOwnPtr<File>> Directory::open(StringView filename, File::OpenMode
|
|||
return File::adopt_fd(fd, mode);
|
||||
}
|
||||
|
||||
ErrorOr<struct stat> Directory::stat(StringView filename, int flags) const
|
||||
{
|
||||
return System::fstatat(m_directory_fd, filename, flags);
|
||||
}
|
||||
|
||||
ErrorOr<struct stat> Directory::stat() const
|
||||
{
|
||||
return System::fstat(m_directory_fd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue