LibCore: Add Stream::File::fd()

Unlike `leak_fd()` the stream is still owning the file descriptor after
the call.
This commit is contained in:
Lucas CHOLLET 2023-01-15 19:34:01 -05:00 committed by Sam Atkins
parent c6aeb9811c
commit 2e52de5744
Notes: sideshowbarker 2024-07-17 02:14:39 +09:00

View File

@ -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)