18 #ifndef ION_PORT_FILEUTILS_H_
19 #define ION_PORT_FILEUTILS_H_
37 const std::string& path, std::chrono::system_clock::time_point* time);
56 ION_API FILE*
OpenFile(
const std::string& path,
const std::string& mode);
64 ION_API
bool RemoveFile(
const std::string& path);
68 ION_API std::vector<std::string>
ListDirectory(
const std::string& path);
73 #endif // ION_PORT_FILEUTILS_H_
std::string GetTemporaryFilename()
Returns a platform-dependent string that names a valid filename which may be opened for reading or wr...
std::vector< std::string > ListDirectory(const std::string &path)
Returns the contents of path, non-recursively.
std::string GetCurrentWorkingDirectory()
Returns a platform-dependent string that is the current working directory.
bool RemoveFile(const std::string &path)
Attempts to remove the file at path and returns whether the file was successfully removed...
bool ReadDataFromFile(const std::string &path, std::string *out)
Opens the file at path and read the contents of the file into a string.
bool GetFileModificationTime(const std::string &path, std::chrono::system_clock::time_point *time)
Reads the last modification time of the passed file path into time and returns true, iff the file exists.
std::string GetCanonicalFilePath(const std::string &path)
Returns a canonical version of a file path string.
FILE * OpenFile(const std::string &path, const std::string &mode)
Opens the file at path and returns a FILE pointer suitable for passing to fread, fwrite, fclose, etc.
std::string GetTemporaryDirectory()
Returns a platform-dependent string that names the temporary directory.