mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:47:35 +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
1 changed files with 5 additions and 0 deletions
|
@ -322,6 +322,11 @@ public:
|
||||||
return m_fd;
|
return m_fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int fd() const
|
||||||
|
{
|
||||||
|
return m_fd;
|
||||||
|
}
|
||||||
|
|
||||||
virtual ~File() override
|
virtual ~File() override
|
||||||
{
|
{
|
||||||
if (m_should_close_file_descriptor == ShouldCloseFileDescriptor::Yes)
|
if (m_should_close_file_descriptor == ShouldCloseFileDescriptor::Yes)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue