mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-14 20:03:29 +00:00
LibCore: Add Stream::File::fd()
Unlike `leak_fd()` the stream is still owning the file descriptor after the call.
This commit is contained in:
parent
c6aeb9811c
commit
2e52de5744
|
@ -322,6 +322,11 @@ public:
|
|||
return m_fd;
|
||||
}
|
||||
|
||||
int fd() const
|
||||
{
|
||||
return m_fd;
|
||||
}
|
||||
|
||||
virtual ~File() override
|
||||
{
|
||||
if (m_should_close_file_descriptor == ShouldCloseFileDescriptor::Yes)
|
||||
|
|
Loading…
Reference in a new issue