iw6-mod/deps/gsc-tool/include/xsk/utils/file.hpp

22 lines
642 B
C++
Raw Permalink Normal View History

2024-05-15 00:49:09 -04:00
// Copyright 2024 xensik. All rights reserved.
2024-02-27 01:34:37 -05:00
//
// Use of this source code is governed by a GNU GPLv3 license
// that can be found in the LICENSE file.
#pragma once
namespace xsk::utils
{
class file
{
public:
static auto read(std::filesystem::path const& file) -> std::vector<u8>;
static auto save(std::filesystem::path const& file, std::vector<u8> const& data) -> void;
static auto save(std::filesystem::path const& file, u8 const* data, usize size) -> void;
static auto length(std::filesystem::path const& file) -> usize;
static auto exists(std::filesystem::path const& file) -> bool;
};
} // namespace xsk::utils