rename fs::stat to fs::get_stat

This commit is contained in:
oltolm 2023-07-18 23:30:36 +02:00 committed by Elad Ashkenazi
parent 73c3d5fc81
commit bc40b61ef1
10 changed files with 17 additions and 17 deletions

View file

@ -502,7 +502,7 @@ std::string_view fs::get_parent_dir_view(std::string_view path, u32 parent_level
return result;
}
bool fs::stat(const std::string& path, stat_t& info)
bool fs::get_stat(const std::string& path, stat_t& info)
{
// Ensure consistent information on failure
info = {};
@ -618,13 +618,13 @@ bool fs::stat(const std::string& path, stat_t& info)
bool fs::exists(const std::string& path)
{
fs::stat_t info{};
return fs::stat(path, info);
return fs::get_stat(path, info);
}
bool fs::is_file(const std::string& path)
{
fs::stat_t info{};
if (!fs::stat(path, info))
if (!fs::get_stat(path, info))
{
return false;
}
@ -641,7 +641,7 @@ bool fs::is_file(const std::string& path)
bool fs::is_dir(const std::string& path)
{
fs::stat_t info{};
if (!fs::stat(path, info))
if (!fs::get_stat(path, info))
{
return false;
}

View file

@ -186,7 +186,7 @@ namespace fs
}
// Get file information
bool stat(const std::string& path, stat_t& info);
bool get_stat(const std::string& path, stat_t& info);
// Check whether a file or a directory exists (not recommended, use is_file() or is_dir() instead)
bool exists(const std::string& path);

View file

@ -726,7 +726,7 @@ bool patch_engine::add_patch_data(YAML::Node node, patch_info& info, u32 modifie
break;
default:
{
const u32 offset = get_yaml_node_value<u32>(addr_node, error_message);
get_yaml_node_value<u32>(addr_node, error_message);
if (!error_message.empty())
{
error_message = fmt::format("Skipping patch data entry: [ %s, 0x%.8x, %s ] (key: %s, location: %s) Invalid patch offset '%s' (not a valid u32 or overflow)",