2#ifndef included_AMP_FileSystem
3#define included_AMP_FileSystem
41void rename(
const std::string &old_filename,
const std::string &new_filename );
53#if !( defined( WIN32 ) || defined( _WIN32 ) || defined( WIN64 ) || defined( _WIN64 ) || \
55[[deprecated(
"recursiveMkdir(path,mode,rank_create) is deprecated, no need to specify "
56 "only_node_zero_creates, use recursiveMkdir(path)" )]]
void
58[[deprecated(
"recursiveMkdir(path,mode) is deprecated, use recursiveMkdir(path) and "
59 "permissions(mode)" )]]
void
62[[deprecated(
"fileExists() is deprecated, use exists()" )]]
bool fileExists(
const std::string & );
63[[deprecated(
"renameFile() is deprecated, use rename()" )]]
void
64renameFile(
const std::string &old_filename,
const std::string &new_filename );
bool fileExists(const std::string &)
std::string filename(const std::string &filename)
Return the filename (strip the path)
std::string path(const std::string &filename)
Return the path to the file.
void renameFile(const std::string &old_filename, const std::string &new_filename)
size_t fileSize(const std::string &filename)
Return the file size.
bool exists(const std::string &filename)
Check if a file exists and return true if it does.
void permissions(const std::string &filename, std::filesystem::perms mode)
Set the permissions for the file or directory.
void recursiveMkdir(const std::string &path)
void rename(const std::string &old_filename, const std::string &new_filename)
Rename a file from old file name to new file name.
void deleteFile(const std::string &filename)
Delete a file. If the file does not exist, nothing will happen.
std::string getSuffix(const std::string &filename)
Get the lower case suffix for a file.