openMSX
Namespaces | Macros | Functions
FileOperations.cc File Reference
#include <sys/types.h>
#include <pwd.h>
#include <climits>
#include <unistd.h>
#include "openmsx.hh"
#include "systemfuncs.hh"
#include <ftw.h>
#include "ReadDir.hh"
#include "FileOperations.hh"
#include "FileException.hh"
#include "StringOp.hh"
#include "statp.hh"
#include "unistdp.hh"
#include "ranges.hh"
#include "strCat.hh"
#include "build-info.hh"
#include <algorithm>
#include <sstream>
#include <cerrno>
#include <cstdlib>
#include <stdexcept>
#include <cassert>
#include <iterator>
#include <dirent.h>
Include dependency graph for FileOperations.cc:

Go to the source code of this file.

Namespaces

 openmsx::FileOperations
 

Macros

#define MAXPATHLEN   4096
 

Functions

string openmsx::FileOperations::expandTilde (string_view path)
 
void openmsx::FileOperations::mkdir (const std::string &path, mode_t mode)
 Create the specified directory. More...
 
void openmsx::FileOperations::mkdirp (string_view path_)
 
int openmsx::FileOperations::unlink (const std::string &path)
 Call unlink() in a platform-independent manner. More...
 
int openmsx::FileOperations::rmdir (const std::string &path)
 Call rmdir() in a platform-independent manner. More...
 
int openmsx::FileOperations::deleteRecursive (const std::string &path)
 Recurively delete a file or directory and (in case of a directory) all its sub-components. More...
 
FILE_t openmsx::FileOperations::openFile (const std::string &filename, const std::string &mode)
 Call fopen() in a platform-independent manner. More...
 
void openmsx::FileOperations::openofstream (std::ofstream &stream, const std::string &filename)
 Open an ofstream in a platform-independent manner. More...
 
void openmsx::FileOperations::openofstream (std::ofstream &stream, const std::string &filename, std::ios_base::openmode mode)
 Open an ofstream in a platform-independent manner. More...
 
string_view openmsx::FileOperations::getFilename (string_view path)
 
string_view openmsx::FileOperations::getDirName (string_view path)
 
string_view openmsx::FileOperations::getExtension (string_view path)
 
string_view openmsx::FileOperations::stripExtension (string_view path)
 
string openmsx::FileOperations::join (string_view part1, string_view part2)
 
string openmsx::FileOperations::join (string_view part1, string_view part2, string_view part3)
 
string openmsx::FileOperations::join (string_view part1, string_view part2, string_view part3, string_view part4)
 
string openmsx::FileOperations::getNativePath (string_view path)
 
string openmsx::FileOperations::getConventionalPath (string_view path)
 
string openmsx::FileOperations::getCurrentWorkingDirectory ()
 Returns the current working directory. More...
 
string openmsx::FileOperations::getAbsolutePath (string_view path)
 
bool openmsx::FileOperations::isAbsolutePath (string_view path)
 
string openmsx::FileOperations::getUserHomeDir (string_view username)
 
const string & openmsx::FileOperations::getUserOpenMSXDir ()
 Get the openMSX dir in the user's home directory. More...
 
string openmsx::FileOperations::getUserDataDir ()
 Get the openMSX data dir in the user's home directory. More...
 
string openmsx::FileOperations::getSystemDataDir ()
 Get system directory. More...
 
string openmsx::FileOperations::expandCurrentDirFromDrive (string_view path)
 
bool openmsx::FileOperations::getStat (string_view filename_, Stat &st)
 
bool openmsx::FileOperations::isRegularFile (const Stat &st)
 
bool openmsx::FileOperations::isRegularFile (string_view filename)
 
bool openmsx::FileOperations::isDirectory (const Stat &st)
 
bool openmsx::FileOperations::isDirectory (string_view directory)
 
bool openmsx::FileOperations::exists (string_view filename)
 
time_t openmsx::FileOperations::getModificationDate (const Stat &st)
 Get the date/time of last modification. More...
 
string openmsx::FileOperations::getNextNumberedFileName (string_view directory, string_view prefix, string_view extension)
 
string openmsx::FileOperations::parseCommandFileArgument (string_view argument, string_view directory, string_view prefix, string_view extension)
 
string openmsx::FileOperations::getTempDir ()
 Get the name of the temp directory on the system. More...
 
FILE_t openmsx::FileOperations::openUniqueFile (const std::string &directory, std::string &filename)
 Open a new file with a unique name in the provided directory. More...
 

Macro Definition Documentation

◆ MAXPATHLEN

#define MAXPATHLEN   4096