Skip to content
Welcome to the new CppUtils documentation!
FileStaging::FileStaging() = default;

FileStaging::FileStaging( std::filesystem::path inputPath, std::filesystem::path stagedPath, std::filesystem::path quarantineDirectory = "", std::filesystem::path archiveDirectory = "");

[[nodiscard]] auto FileStaging::inputPath() const noexcept -> const std::filesystem::path&;

[[nodiscard]] auto FileStaging::stagedPath() const noexcept -> const std::filesystem::path&;

[[nodiscard]] auto FileStaging::archiveDirectory() const noexcept -> const std::filesystem::path&;

[[nodiscard]] auto FileStaging::quarantineDirectory() const noexcept -> const std::filesystem::path&;

auto FileStaging::complete() const -> std::expected<std::filesystem::path, std::error_code>;

auto FileStaging::abort() const -> std::expected<std::filesystem::path, std::error_code>;

auto FileStaging::retry() const -> std::expected<std::filesystem::path, std::error_code>;

[[nodiscard]] static auto FileStaging::stage( const std::filesystem::path& inputFilePath, const std::filesystem::path& stagingDirectory = "staging", const std::filesystem::path& quarantineDirectory = "", const std::filesystem::path& archiveDirectory = "") -> std::expected<FileStaging, std::error_code>;