summaryrefslogtreecommitdiff
path: root/Libraries/LibCore
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-09-04 15:13:55 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-09-04 15:13:55 +0200
commit16de02cce0a862b62075011d5fee36564aaa959d (patch)
tree3a176d2f32e5d2a834d496f9c6ad7f96011a60e9 /Libraries/LibCore
parentce837d157ff238c59ccbdb40aaf811a9fa627dad (diff)
downloadserenity-16de02cce0a862b62075011d5fee36564aaa959d.zip
CIODevice: Add is_open()
Diffstat (limited to 'Libraries/LibCore')
-rw-r--r--Libraries/LibCore/CIODevice.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Libraries/LibCore/CIODevice.h b/Libraries/LibCore/CIODevice.h
index b50e8135b8..e57c650899 100644
--- a/Libraries/LibCore/CIODevice.h
+++ b/Libraries/LibCore/CIODevice.h
@@ -21,6 +21,7 @@ public:
int fd() const { return m_fd; }
unsigned mode() const { return m_mode; }
+ bool is_open() const { return m_mode != NotOpen; }
bool eof() const { return m_eof; }
int error() const { return m_error; }