mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 11:34:59 +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
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