mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-08 20:32:56 +03: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
Notes:
sideshowbarker
2024-07-17 02:14:39 +09:00
Author: https://github.com/LucasChollet Commit: https://github.com/SerenityOS/serenity/commit/2e52de5744 Pull-request: https://github.com/SerenityOS/serenity/pull/17037 Reviewed-by: https://github.com/AtkinsSJ ✅
@ -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 New Issue
Block a user