1#ifndef SOURCEMETA_CORE_METAPACK_WRITE_H_
2#define SOURCEMETA_CORE_METAPACK_WRITE_H_
4#ifndef SOURCEMETA_CORE_METAPACK_EXPORT
5#include <sourcemeta/core/metapack_export.h>
9#include <sourcemeta/core/metapack_error.h>
10#include <sourcemeta/core/metapack_format.h>
13#include <sourcemeta/core/json.h>
20namespace sourcemeta::core {
35SOURCEMETA_CORE_METAPACK_EXPORT
38 const std::string_view media_type,
40 const std::span<const std::uint8_t> extension = {})
57SOURCEMETA_CORE_METAPACK_EXPORT
59 const std::filesystem::path &destination,
const JSON &document,
61 const std::span<const std::uint8_t> extension = {}) ->
void;
75SOURCEMETA_CORE_METAPACK_EXPORT
77 const std::string_view contents,
78 const std::string_view media_type,
80 const std::span<const std::uint8_t> extension = {})
96SOURCEMETA_CORE_METAPACK_EXPORT
98 const std::span<const std::uint8_t> contents,
99 const std::string_view media_type,
101 const std::span<const std::uint8_t> extension = {})
115SOURCEMETA_CORE_METAPACK_EXPORT
117 const std::filesystem::path &source,
118 const std::string_view media_type,
120 const std::span<const std::uint8_t> extension = {})