revert
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good

This commit is contained in:
2024-01-29 11:36:26 -06:00
parent d175a38ad1
commit 99533a9687
213 changed files with 43429 additions and 41103 deletions

View File

@@ -1,5 +1,5 @@
/*
Copyright <2018-2023> <scott.e.graves@protonmail.com>
Copyright <2018-2024> <scott.e.graves@protonmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -27,6 +27,11 @@
namespace repertory {
class native_file final {
public:
native_file(const native_file &) = delete;
native_file(native_file &&) = delete;
auto operator=(const native_file &) -> native_file & = delete;
auto operator=(native_file &&) -> native_file & = delete;
using native_file_ptr = std::shared_ptr<native_file>;
public:
@@ -34,22 +39,21 @@ public:
return std::shared_ptr<native_file>(new native_file(handle));
}
[[nodiscard]] static auto clone(const native_file_ptr &nativeFile)
[[nodiscard]] static auto clone(const native_file_ptr &ptr)
-> native_file_ptr;
[[nodiscard]] static auto create_or_open(const std::string &source_path,
bool should_chmod,
native_file_ptr &nf) -> api_error;
bool read_only, native_file_ptr &ptr)
-> api_error;
[[nodiscard]] static auto create_or_open(const std::string &source_path,
native_file_ptr &nf) -> api_error;
native_file_ptr &ptr) -> api_error;
[[nodiscard]] static auto open(const std::string &source_path,
native_file_ptr &nf) -> api_error;
native_file_ptr &ptr) -> api_error;
[[nodiscard]] static auto open(const std::string &source_path,
bool should_chmod, native_file_ptr &nf)
-> api_error;
[[nodiscard]] static auto open(const std::string &source_path, bool read_only,
native_file_ptr &ptr) -> api_error;
private:
explicit native_file(const native_handle &handle) : handle_(handle) {}
@@ -71,7 +75,7 @@ public:
void close();
[[nodiscard]] auto copy_from(const native_file_ptr &source) -> bool;
[[nodiscard]] auto copy_from(const native_file_ptr &ptr) -> bool;
[[nodiscard]] auto copy_from(const std::string &path) -> bool;