2016-12-05 04:30:25 +01:00
|
|
|
/*****************************************************************************
|
2018-06-15 14:07:34 +02:00
|
|
|
* Copyright (c) 2014-2018 OpenRCT2 developers
|
2016-12-05 04:30:25 +01:00
|
|
|
*
|
2018-06-15 14:07:34 +02: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
|
|
|
*
|
2018-06-15 14:07:34 +02:00
|
|
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
2016-12-05 04:30:25 +01:00
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2017-01-05 19:13:48 +01:00
|
|
|
#include <string>
|
2018-05-02 14:15:26 +02:00
|
|
|
#include <string_view>
|
2017-05-17 20:11:42 +02:00
|
|
|
#include <vector>
|
2016-12-05 04:30:25 +01:00
|
|
|
#include "../common.h"
|
|
|
|
|
|
|
|
namespace File
|
|
|
|
{
|
2017-02-09 22:48:44 +01:00
|
|
|
bool Exists(const std::string &path);
|
2017-01-05 19:13:48 +01:00
|
|
|
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);
|
2018-06-20 17:28:51 +02:00
|
|
|
std::vector<uint8_t> ReadAllBytes(const std::string_view& path);
|
2018-05-26 19:56:18 +02:00
|
|
|
std::string ReadAllText(const std::string_view& path);
|
2017-02-09 22:32:17 +01:00
|
|
|
void WriteAllBytes(const std::string &path, const void * buffer, size_t length);
|
2017-05-17 20:11:42 +02:00
|
|
|
std::vector<std::string> ReadAllLines(const std::string &path);
|
2018-06-20 17:28:51 +02:00
|
|
|
uint64_t GetLastModified(const std::string &path);
|
2018-05-04 22:40:09 +02:00
|
|
|
} // namespace File
|