Vuo
0.4.1
|
Functions for dealing with files.
Static Public Member Functions | |
static void | splitPath (string path, string &dir, string &file, string &extension) |
Splits path into its directory, file name, and file extension. | |
static string | makeTmpFile (string file, string extension, string directory="/tmp") |
Creates a new temporary file, avoiding any name conflicts with existing files. | |
static string | makeTmpDir (string dir) |
Creates a new temporary directory, avoiding any name conflicts with existing files. | |
static FILE * | stringToCFile (const char *string) |
Writes the contents of the input string to a C file. | |
static set< string > | findFilesInDirectory (string dirPath) |
Searches a directory for files. | |
static set< string > | findFilesInDirectory (string dirPath, string extension) |
Searches a directory for files with a given extension. | |
|
static |
Searches a directory for files.
dirPath | The directory to search in. |
dirPath
.
|
static |
Searches a directory for files with a given extension.
dirPath | The directory to search in. |
extension | The file extension to match on, without the '.' character (e.g. "bc" not ".bc"). |
dirPath
.
|
static |
Creates a new temporary directory, avoiding any name conflicts with existing files.
Returns the path of the directory.
|
static |
Creates a new temporary file, avoiding any name conflicts with existing files.
Creates the file in the specified directory
if one is provided, or in "/tmp" otherwise.
Returns the path of the file.
|
static |
Splits path
into its directory, file name, and file extension.
[in] | path | The path to split. |
[out] | dir | The directory in path , if any. Ends with a file separator (e.g. '/') if there was one in path . |
[out] | file | The file name in path , if any. |
[out] | extension | The file extension in path , if any. Does not include the '.' character. |