26 lines
681 B
C++
26 lines
681 B
C++
// TJP COPYRIGHT HEADER
|
|
|
|
#pragma once
|
|
|
|
#include "Contents.h"
|
|
#include <tjp/core/string/String.hpp>
|
|
#include <tjp/core/containers/Optional.hpp>
|
|
|
|
namespace tjp::core::file {
|
|
|
|
struct WriteOptions {
|
|
time_t lastModifiedTime = 0;
|
|
} ;
|
|
|
|
bool write(const String &path, const ContentsView &, const WriteOptions &options = {});
|
|
void require_write(const String &path, const ContentsView &, const WriteOptions &options = {});
|
|
|
|
bool write(const StringView &path, const ContentsView &, const WriteOptions &options = {});
|
|
void require_write(const StringView &path, const ContentsView &, const WriteOptions &options = {});
|
|
|
|
} // namespace
|
|
|
|
#ifdef TJP_CORE_HEADER_ONLY
|
|
#include "write.cpp"
|
|
#endif
|