0.44.0
|
#include <iaDirectory.h>
Public Member Functions | |
iaDirectory (const iaString &directoryName) | |
iaDirectory () | |
iaDirectory | operator= (const iaString &directoryName) |
iaString | getFullDirectoryName () const |
iaString | getDirectoryName () const |
iaString | getFullParentDirectoryName () const |
std::vector< iaDirectory > | getDirectories (bool recursive=false, bool orderAlphabetically=true) const |
std::vector< iaFile > | getFiles (const iaString &searchPattern=L"*", bool recursive=false, bool orderAlphabetically=true) const |
bool | exists () const |
bool | isRoot () |
Static Public Member Functions | |
static iaString | getRelativePath (const iaString &from, const iaString &to) |
static void | setCurrentDirectory (const iaString &directoyName) |
static iaString | getCurrentDirectory () |
static bool | directoryIsAbsolute (const iaString &directoryname) |
static bool | isDirectory (const iaString &directoryname) |
static void | makeDirectory (const iaString &path) |
static bool | exists (const iaString &path) |
static bool | isEmpty (const iaString &path) |
static iaString | fixPath (const iaString &directoryName, bool file) |
Friends | |
class | iaFile |
handles directories and containing files
iaux::iaDirectory::iaDirectory | ( | const iaString & | directoryName | ) |
creates an object for some directory
directoryName | path of directory |
iaux::iaDirectory::iaDirectory | ( | ) |
empty directory ctor
|
static |
bool iaux::iaDirectory::exists | ( | ) | const |
|
static |
path | the given directory |
fixes the path from something like "../bla\blubber/temp.txt" to an absolute c:\bla\blubber\temp.txt
directoryName | path to fix |
file | true: it's a file; false: it's a directory |
|
static |
std::vector< iaDirectory > iaux::iaDirectory::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 |
iaString iaux::iaDirectory::getDirectoryName | ( | ) | const |
e.g. if the directory is c:\foo\bar than the directory name is bar
std::vector< iaFile > iaux::iaDirectory::getFiles | ( | const iaString & | searchPattern = L"*" , |
bool | recursive = false , |
||
bool | orderAlphabetically = true |
||
) | const |
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 |
iaString iaux::iaDirectory::getFullDirectoryName | ( | ) | const |
e.g. if the path is c:\foo\bar then this returns c:\foo\bar
iaString iaux::iaDirectory::getFullParentDirectoryName | ( | ) | const |
e.g. if the path is c:\foo\bar then this returns c:\foo
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 |
|
static |
|
static |
path | the given directory |
bool iaux::iaDirectory::isRoot | ( | ) |
eg c:, d: (windows) / (linux)
|
static |
creates directory at given path
path | given path |
iaDirectory iaux::iaDirectory::operator= | ( | const iaString & | directoryName | ) |
copy operator
directoryName | path of directory |
|
static |
set's the current or working directory
directoyName | the directory path |
|
friend |