mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 17:28:48 +00:00
Kernel: Add File::is_regular_file()
This makes it easy and expressive to check if a File is a regular file.
This commit is contained in:
parent
c8ff2184bd
commit
4dd148f07c
Notes:
sideshowbarker
2024-07-17 06:20:50 +09:00
Author: https://github.com/awesomekling
Commit: 4dd148f07c
Pull-request: https://github.com/SerenityOS/serenity/pull/16231
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/emanuele6
Reviewed-by: https://github.com/fdellwing
Reviewed-by: https://github.com/skyrising
Reviewed-by: https://github.com/supercomputer7
Reviewed-by: https://github.com/timschumi ✅
3 changed files with 9 additions and 0 deletions
|
@ -120,4 +120,9 @@ ErrorOr<void> InodeFile::chmod(Credentials const& credentials, OpenFileDescripti
|
|||
return VirtualFileSystem::the().chmod(credentials, *description.custody(), mode);
|
||||
}
|
||||
|
||||
bool InodeFile::is_regular_file() const
|
||||
{
|
||||
return inode().metadata().is_regular_file();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue