mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:57:35 +00:00
AK: Move Handle
from LibCore
and name it MaybeOwned
The new name should make it abundantly clear what it does.
This commit is contained in:
parent
5fa590de71
commit
5f2ea31816
16 changed files with 115 additions and 92 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/MaybeOwned.h>
|
||||
#include <AK/Span.h>
|
||||
#include <LibArchive/Tar.h>
|
||||
#include <LibCore/Stream.h>
|
||||
|
@ -58,14 +59,14 @@ private:
|
|||
|
||||
class TarOutputStream {
|
||||
public:
|
||||
TarOutputStream(Core::Stream::Handle<Core::Stream::Stream>);
|
||||
TarOutputStream(MaybeOwned<Core::Stream::Stream>);
|
||||
ErrorOr<void> add_file(StringView path, mode_t, ReadonlyBytes);
|
||||
ErrorOr<void> add_link(StringView path, mode_t, StringView);
|
||||
ErrorOr<void> add_directory(StringView path, mode_t);
|
||||
ErrorOr<void> finish();
|
||||
|
||||
private:
|
||||
Core::Stream::Handle<Core::Stream::Stream> m_stream;
|
||||
MaybeOwned<Core::Stream::Stream> m_stream;
|
||||
bool m_finished { false };
|
||||
|
||||
friend class TarFileStream;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue