mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:37:43 +00:00
LibCore: Move Stream-based file into the Core
namespace
This commit is contained in:
parent
a96339b72b
commit
606a3982f3
218 changed files with 748 additions and 643 deletions
|
@ -22,18 +22,18 @@ namespace FileSystemAccessClient {
|
|||
class Client;
|
||||
class File {
|
||||
public:
|
||||
File(Badge<Client>, NonnullOwnPtr<Core::Stream::File> stream, String filename)
|
||||
File(Badge<Client>, NonnullOwnPtr<Core::File> stream, String filename)
|
||||
: m_stream(move(stream))
|
||||
, m_filename(filename)
|
||||
{
|
||||
}
|
||||
|
||||
Core::Stream::File& stream() const { return *m_stream; }
|
||||
NonnullOwnPtr<Core::Stream::File> release_stream() { return move(m_stream); }
|
||||
Core::File& stream() const { return *m_stream; }
|
||||
NonnullOwnPtr<Core::File> release_stream() { return move(m_stream); }
|
||||
String filename() const { return m_filename; }
|
||||
|
||||
private:
|
||||
NonnullOwnPtr<Core::Stream::File> m_stream;
|
||||
NonnullOwnPtr<Core::File> m_stream;
|
||||
String m_filename;
|
||||
};
|
||||
|
||||
|
@ -52,9 +52,9 @@ public:
|
|||
DeprecatedResult try_save_file_deprecated(GUI::Window* parent_window, DeprecatedString const& name, DeprecatedString const ext, Core::OpenMode requested_access = Core::OpenMode::WriteOnly | Core::OpenMode::Truncate);
|
||||
|
||||
Result request_file_read_only_approved(GUI::Window* parent_window, DeprecatedString const& path);
|
||||
Result request_file(GUI::Window* parent_window, DeprecatedString const& path, Core::Stream::OpenMode requested_access);
|
||||
Result open_file(GUI::Window* parent_window, DeprecatedString const& window_title = {}, StringView path = Core::StandardPaths::home_directory(), Core::Stream::OpenMode requested_access = Core::Stream::OpenMode::Read);
|
||||
Result save_file(GUI::Window* parent_window, DeprecatedString const& name, DeprecatedString const ext, Core::Stream::OpenMode requested_access = Core::Stream::OpenMode::Write | Core::Stream::OpenMode::Truncate);
|
||||
Result request_file(GUI::Window* parent_window, DeprecatedString const& path, Core::File::OpenMode requested_access);
|
||||
Result open_file(GUI::Window* parent_window, DeprecatedString const& window_title = {}, StringView path = Core::StandardPaths::home_directory(), Core::File::OpenMode requested_access = Core::File::OpenMode::Read);
|
||||
Result save_file(GUI::Window* parent_window, DeprecatedString const& name, DeprecatedString const ext, Core::File::OpenMode requested_access = Core::File::OpenMode::Write | Core::File::OpenMode::Truncate);
|
||||
|
||||
static Client& the();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue