|
0.46.0
|
#include <iaPath.h>
Public Member Functions | |
| iaPath (const iaString &path) | |
| iaPath () | |
| iaPath | operator= (const iaString &path) |
| bool | operator== (const iaString &other) |
| bool | operator!= (const iaString &other) |
| const iaString | getAbsolutePath () const |
| const iaString | getName () const |
| const iaString | getParentPath () const |
| const iaString | getStem () const |
| const iaString | getExtension () const |
| std::vector< iaPath > | getDirectories (bool recursive=false, bool orderAlphabetically=true) const |
| std::vector< iaFile > | getFiles (const iaString &searchPattern=L"*", bool recursive=false, bool orderAlphabetically=true) const |
| bool | isDirectory () const |
| bool | isFile () const |
| bool | isSymlink () const |
| bool | exists () const |
| bool | isRoot () |
| iaTime | getLastModifiedTime () const |
Static Public Member Functions | |
| static const iaString | getName (const iaString &path) |
| static const iaString | getParentPath (const iaString &path) |
| static const iaString | getStem (const iaString &path) |
| static const iaString | getExtension (const iaString &path) |
| static iaString | getRelativePath (const iaString &from, const iaString &to) |
| static void | setCurrentDirectory (const iaString &path) |
| static iaString | getCurrentDirectory () |
| static bool | directoryIsAbsolute (const iaString &path) |
| static bool | isDirectory (const iaString &path) |
| static bool | isFile (const iaString &path) |
| static bool | isSymlink (const iaString &path) |
| static void | remove (const iaString &path) |
| static void | copy (const iaString &src, const iaString &dst) |
| static void | rename (const iaString &src, const iaString &dst, bool replaceExisting=false) |
| static void | makeDirectory (const iaString &path) |
| static bool | exists (const iaString &path) |
| static bool | isEmpty (const iaString &path) |
| static iaString | fixPath (const iaString &path) |
| static iaString | generateUniqueFilename (const iaString &filename) |
| static iaTime | getLastModifiedTime (const iaString &path) |
handles directories and containing files
| iaux::iaPath::iaPath | ( | const iaString & | path | ) |
creates an object for some directory
| path | path of directory |
| iaux::iaPath::iaPath | ( | ) |
empty directory ctor
copys the file to a new destination
| newFileName | name of copy destination |
|
static |
| path | the given path |
| bool iaux::iaPath::exists | ( | ) | const |
|
static |
relative to current or absolute
| path | the given path |
fixes the path from something like "../bla\blubber/temp.txt" to an absolute c:\bla\blubber\temp.txt
| path | path to fix |
| filename | the given filename |
| const iaString iaux::iaPath::getAbsolutePath | ( | ) | const |
To generate an absolute path it check if it exists relative to the current directory
|
static |
| std::vector< iaPath > iaux::iaPath::getDirectories | ( | bool | recursive = false, |
| bool | orderAlphabetically = true |
||
| ) | const |
| recursive | true: search recursively; false: search only in current directory |
| orderAlphabetically | true: returns directories in alphabetical order |
| const iaString iaux::iaPath::getExtension | ( | ) | const |
| path | the given path |
| std::vector< iaFile > iaux::iaPath::getFiles | ( | const iaString & | searchPattern = L"*", |
| bool | recursive = false, |
||
| bool | orderAlphabetically = true |
||
| ) | const |
assuming path is an existing directory
| searchPattern | what to search for using regular expression |
| recursive | true: search recursively; false: search only in current directory |
| orderAlphabetically | true: returns files in alphabetical order |
| iaTime iaux::iaPath::getLastModifiedTime | ( | ) | const |
| path | the given path |
| const iaString iaux::iaPath::getName | ( | ) | const |
examples: "c:\foo\bar" -> "bar" "/foo/bar.txt" -> "bar.txt"
examples: "c:\foo\bar" -> "bar" "/foo/bar.txt" -> "bar.txt"
| path | the given path |
| const iaString iaux::iaPath::getParentPath | ( | ) | const |
e.g. if the path is c:\foo\bar then this returns c:\foo
e.g. if the path is c:\foo\bar then this returns c:\foo
| path | the given path |
| from | the path from where the relative path comes from (can also be a full file path) |
| to | the path the relative path will point to |
| const iaString iaux::iaPath::getStem | ( | ) | const |
"" if this is not a file
"" if this is not a file
| path | the given path |
| bool iaux::iaPath::isDirectory | ( | ) | const |
|
static |
| path | the given path |
|
static |
| path | the given directory |
| bool iaux::iaPath::isFile | ( | ) | const |
|
static |
| path | the given path |
| bool iaux::iaPath::isRoot | ( | ) |
eg c:, d: (windows) / (linux)
| bool iaux::iaPath::isSymlink | ( | ) | const |
|
static |
| path | the given path |
|
static |
creates directory at given path
| path | given path |
| bool iaux::iaPath::operator!= | ( | const iaString & | other | ) |
unequal operator
| other | the other path to compare with |
copy operator
| path | path of directory |
| bool iaux::iaPath::operator== | ( | const iaString & | other | ) |
equal operator
| other | the other path to compare with |
|
static |
deletes/removes path from filesystem
| path | the file or directory to remove |
|
static |
renames path to a new name
| src | the source path |
| dst | the destination path |
| replaceExisting | true: destination will be replaced; false: no action will be taken if destination already exists |
|
static |
set's the current or working directory
| path | the directory path |