OpenRCT2/src/openrct2/core/File.h

31 lines
1.1 KiB
C
Raw Normal View History

2016-12-05 04:30:25 +01:00
/*****************************************************************************
* Copyright (c) 2014-2021 OpenRCT2 developers
2016-12-05 04:30:25 +01:00
*
* For a complete list of all authors, please refer to contributors.md
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
2016-12-05 04:30:25 +01:00
*
* OpenRCT2 is licensed under the GNU General Public License version 3.
2016-12-05 04:30:25 +01:00
*****************************************************************************/
#pragma once
2018-06-22 22:58:39 +02:00
#include "../common.h"
#include <string>
#include <string_view>
2017-05-17 20:11:42 +02:00
#include <vector>
2016-12-05 04:30:25 +01:00
namespace File
{
2018-06-22 22:58:39 +02:00
bool Exists(const std::string& path);
bool Copy(const std::string& srcPath, const std::string& dstPath, bool overwrite);
bool Delete(const std::string& path);
bool Move(const std::string& srcPath, const std::string& dstPath);
std::vector<uint8_t> ReadAllBytes(std::string_view path);
std::string ReadAllText(std::string_view path);
std::vector<std::string> ReadAllLines(std::string_view path);
2018-06-22 22:58:39 +02:00
void WriteAllBytes(const std::string& path, const void* buffer, size_t length);
uint64_t GetLastModified(const std::string& path);
uint64_t GetSize(std::string_view path);
2018-05-04 22:40:09 +02:00
} // namespace File