1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:47:35 +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

@ -116,6 +116,7 @@ ErrorOr<sig_t> signal(int signal, sig_t handler);
ErrorOr<sighandler_t> signal(int signal, sighandler_t handler);
#endif
ErrorOr<struct stat> fstat(int fd);
ErrorOr<struct stat> fstatat(int fd, StringView path, int flags);
ErrorOr<int> fcntl(int fd, int command, ...);
ErrorOr<void*> mmap(void* address, size_t, int protection, int flags, int fd, off_t, size_t alignment = 0, StringView name = {});
ErrorOr<void> munmap(void* address, size_t);