gsc-tool/include/xsk/utils/file.hpp
2023-03-02 16:41:32 +01:00

22 lines
642 B
C++

// Copyright 2023 xensik. All rights reserved.
//
// 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