Files
core_misc/tjp/core/file/VirtualFileSystem.cpp
Timothy Prepscius fa54be052a flatten 20260225
2026-02-25 12:39:24 -05:00

32 lines
620 B
C++

// TJP COPYRIGHT HEADER
#ifdef TJP_CORE_HEADER_ONLY
#pragma once
#endif
#include <tjp/core/header_only/compile.h>
#include "VirtualFileSystem.hpp"
namespace tjp::core::file {
TJP_CORE_HEADER_ONLY_INLINE
Contents readFile(const VirtualFileSystem &system, const StringView &path)
{
return system.get(path);
}
TJP_CORE_HEADER_ONLY_INLINE
void writeFile(VirtualFileSystem &system, const StringView &path, ContentsView contents)
{
return system.put(path, contents);
}
TJP_CORE_HEADER_ONLY_INLINE
bool fileExists(const VirtualFileSystem &system, const StringView &path)
{
return system.has(path);
}
} // namespace