moved looks_like_pbl to filesystem.cpp
This commit is contained in:
parent
7094773fd4
commit
d159b15637
3 changed files with 8 additions and 5 deletions
|
@ -242,11 +242,6 @@ static void archive_file(const std::string& path, const std::string& fname, conf
|
|||
cfg["contents"] = encode_binary(strip_cr(read_file(path + '/' + fname),is_cfg));
|
||||
}
|
||||
|
||||
inline bool looks_like_pbl(const std::string& file)
|
||||
{
|
||||
return utils::wildcard_string_match(utils::lowercase(file), "*.pbl");
|
||||
}
|
||||
|
||||
static void archive_dir(const std::string& path, const std::string& dirname, config& cfg, std::pair<std::vector<std::string>, std::vector<std::string> >& ignore_patterns)
|
||||
{
|
||||
cfg["name"] = dirname;
|
||||
|
|
|
@ -62,6 +62,7 @@ BPath be_path;
|
|||
#include "log.hpp"
|
||||
#include "loadscreen.hpp"
|
||||
#include "scoped_resource.hpp"
|
||||
#include "serialization/string_utils.hpp"
|
||||
|
||||
static lg::log_domain log_filesystem("filesystem");
|
||||
#define DBG_FS LOG_STREAM(debug, log_filesystem)
|
||||
|
@ -350,6 +351,11 @@ bool make_directory(const std::string& path)
|
|||
return (mkdir(path.c_str(),AccessMode) == 0);
|
||||
}
|
||||
|
||||
bool looks_like_pbl(const std::string& file)
|
||||
{
|
||||
return utils::wildcard_string_match(utils::lowercase(file), "*.pbl");
|
||||
}
|
||||
|
||||
// This deletes a directory with no hidden files and subdirectories.
|
||||
// Also deletes a single file.
|
||||
bool delete_directory(const std::string& path)
|
||||
|
|
|
@ -86,6 +86,8 @@ std::string get_exe_dir();
|
|||
bool make_directory(const std::string& dirname);
|
||||
bool delete_directory(const std::string& dirname);
|
||||
|
||||
bool looks_like_pbl(const std::string& file);
|
||||
|
||||
// Basic disk I/O:
|
||||
|
||||
/** Basic disk I/O - read file.
|
||||
|
|
Loading…
Add table
Reference in a new issue