summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCore/File.h
diff options
context:
space:
mode:
authorSamuel Bowman <sam@sambowman.tech>2022-06-26 19:04:06 -0400
committerLinus Groh <mail@linusgroh.de>2022-07-21 20:13:44 +0100
commit7b8088c78d66f4d4a551c626971276d148907820 (patch)
tree3ac27ff4953d87a53166200efb458ff101179e84 /Userland/Libraries/LibCore/File.h
parent380ce43afc7072ca8ff9fb3915771a029e34ac43 (diff)
downloadserenity-7b8088c78d66f4d4a551c626971276d148907820.zip
LibCore: Add File::is_{block,char}_device() helpers
The existing File::is_device() helpers don't distinguish between block and char devices. This commit adds File::is_block_device() and File::is_char_device() helpers which are more specific.
Diffstat (limited to 'Userland/Libraries/LibCore/File.h')
-rw-r--r--Userland/Libraries/LibCore/File.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Libraries/LibCore/File.h b/Userland/Libraries/LibCore/File.h
index b9394b53d7..6037ff4c99 100644
--- a/Userland/Libraries/LibCore/File.h
+++ b/Userland/Libraries/LibCore/File.h
@@ -28,6 +28,10 @@ public:
bool is_device() const;
static bool is_device(String const& filename);
+ bool is_block_device() const;
+ static bool is_block_device(String const& filename);
+ bool is_char_device() const;
+ static bool is_char_device(String const& filename);
bool is_link() const;
static bool is_link(String const& filename);