|
static std::vector< std::string > | listFiles (std::string path) |
| Lists all the files in the given directory.
|
|
static std::string | getFileExtension (const std::string &path) |
| Attempts to return a string containing the file extension of a given path, including the period (.)
|
|
static std::string | getFileName (const std::string &path) |
| Attempts to return the name of a file at the end of a given file path.
|
|
static std::string | getFilePath (const std::string &path) |
| Attempts to return the path of a given filepath without the file name, including trailing separator char.
|
|
static bool | fileExists (const std::string &) |
| Returns true if a file exists with the name at the given path.
|
|
static bool | createDirectory (const std::string &) |
| Tries to create a directory relative to the executable or via an absolute path. More...
|
|
static bool | directoryExists (const std::string &) |
| Attempts to determine if a directory at the given path exists. More...
|
|
static std::vector< std::string > | listDirectories (const std::string &) |
| Returns a vector of strings containing the names of directories found in the given path.
|
|
static std::string | getCurrentDirectory () |
| Returns the absolute path of the current working directory.
|
|
static bool | setCurrentDirectory (std::string path) |
| Sets the current working directory to the given absolute path. More...
|
|
static std::string | getRelativePath (std::string path, const std::string &root) |
| Attempts to convert the given absolute path to a path relative to the given root directory. More...
|
|
static std::string | getConfigDirectory (const std::string &appName) |
| Returns a path to the current user's config directory. Config files should generally be written to this directory, rather than the current working directory. Output is usually in the form of the following: More...
|
|
static std::string | openFileDialogue (const std::string &defaultDir="", const std::string &filter="") |
| Show a native file dialog to open a file. More...
|
|
static std::string | openFolderDialogue () |
| Show a native file dialog to open a folder. More...
|
|
static std::string | saveFileDialogue (const std::string &defaultDir="", const std::string &filter="") |
| Show a platform native file dialogue for saving files. More...
|
|
static std::string | getResourcePath () |
| Currently only relevant on macOS when creating an app bundle. Basically a wrapper around the SFML resourcePath() function. Might potentially provide some portable way of bundling resources nicely in the future. More...
|
|
static void | setResourceDirectory (const std::string &path) |
| Sets the resource directory relative to the working directory. When using getResourcePath() this path will be appended to the working directory. Used, for example, when setting a sub-directory as a resource directory.
|
|
Utilities for manipulating the current file system.