#include <cel_filepath.h>
Public Member Functions | |
| Path () | |
| Path (const Path &inFilePath) | |
| Path (const String &inFilePath) | |
| Path (const char *inFilePath) | |
| Path (const utf8s &inFilePath) | |
| Path (const UChar2 *inFilePath) | |
| Path (const UChar4 *inFilePath) | |
| Path & | operator= (const Path &inFilePath) |
| Path & | operator= (const String &inFilePath) |
| Path & | operator= (const utf8s &inFilePath) |
| Path & | operator= (const UChar2 *inFilePath) |
| Path & | operator= (const UChar4 *inFilePath) |
| operator String () const | |
| String | getPath () const |
| void | assign (const String &inFilePath) |
| String | getBodyFileName () const |
| String | removeFileNameFromPath () const |
| String | removeTrailingPathSeparator () const |
| String | getExtension () const |
| String | removeExtension () const |
| bool | doesExist () const |
| bool | isDirectory () const |
| bool | deleteFile () const |
| bool | overwriteWith (const Path &inSrc, bool forceOverwrite=false) const |
| bool | replaceWith (const Path &inReplacer) const |
Definition at line 26 of file cel_filepath.h.
| Celartem::Path::Path | ( | ) | [inline] |
Default constructor.
Definition at line 32 of file cel_filepath.h.
| Celartem::Path::Path | ( | const Path & | inFilePath | ) | [inline] |
This constructor is for duplicating the Path instance.
| inFilePath | The file path to be stored. |
Definition at line 39 of file cel_filepath.h.
| Celartem::Path::Path | ( | const String & | inFilePath | ) | [inline] |
This constructor initializes the instance with the specified file path.
| inFilePath | The file path to be stored. |
Definition at line 47 of file cel_filepath.h.
| Celartem::Path::Path | ( | const char * | inFilePath | ) | [inline] |
This constructor initializes the instance with the specified file path.
| inFilePath | The file path to be stored. |
Definition at line 55 of file cel_filepath.h.
| Celartem::Path::Path | ( | const utf8s & | inFilePath | ) | [inline] |
This constructor initializes the instance with the specified file path.
| inFilePath | The file path to be stored. |
Definition at line 63 of file cel_filepath.h.
| Celartem::Path::Path | ( | const UChar2 * | inFilePath | ) | [inline] |
This constructor initializes the instance with the specified file path.
| inFilePath | The file path to be stored. |
Definition at line 71 of file cel_filepath.h.
| Celartem::Path::Path | ( | const UChar4 * | inFilePath | ) | [inline] |
This constructor initializes the instance with the specified file path.
| inFilePath | The file path to be stored. |
Definition at line 79 of file cel_filepath.h.
This function duplicates the specified Path instance.
| inFilePath | The file path to be stored. |
Definition at line 88 of file cel_filepath.h.
This function set the specified file path to this instance.
| inFilePath | The file path to be stored. |
Definition at line 102 of file cel_filepath.h.
This function set the specified file path to this instance.
| inFilePath | The file path to be stored. |
Definition at line 116 of file cel_filepath.h.
This function set the specified file path to this instance.
| inFilePath | The file path to be stored. |
Definition at line 130 of file cel_filepath.h.
This function set the specified file path to this instance.
| inFilePath | The file path to be stored. |
Definition at line 144 of file cel_filepath.h.
| Celartem::Path::operator String | ( | ) | const [inline] |
This function implicitly convert the instance into String. You can assume the file path returned is normalized.
Definition at line 157 of file cel_filepath.h.
| String Celartem::Path::getPath | ( | ) | const [inline] |
This function explicitly convert the instance into String. You can assume the file path returned is normalized.
Definition at line 166 of file cel_filepath.h.
| void Celartem::Path::assign | ( | const String & | inFilePath | ) | [inline] |
This function set the specified file path to this instance. It internally calls FileUtils::normalizePath function.
| inFilePath | The file path to be stored. |
Definition at line 174 of file cel_filepath.h.
Referenced by operator=(), and Path().
| String Celartem::Path::getBodyFileName | ( | ) | const [inline] |
This function returns the body file name.
If you pass "C:\foo\bar\baz.txt" for the function, it returns "baz.txt". On Windows, this function also works with '/' path separator.
Definition at line 187 of file cel_filepath.h.
| String Celartem::Path::removeFileNameFromPath | ( | ) | const [inline] |
This function removes the body file name from the specified path. If you pass "C:\foo\bar\baz" for the function, it returns "C:\foo\bar\" and never removes the last '\' from the path. On Windows, this function also works with '/' path separator.
Definition at line 200 of file cel_filepath.h.
| String Celartem::Path::removeTrailingPathSeparator | ( | ) | const [inline] |
This function removes the traling path separator from the specified path. If you pass "C:\foo\bar\baz\" for the function, it returns "C:\foo\bar\baz". On Windows, this function also works with '/' path separator.
Definition at line 213 of file cel_filepath.h.
| String Celartem::Path::getExtension | ( | ) | const [inline] |
This function returns the extension ".XXX".
Definition at line 223 of file cel_filepath.h.
| String Celartem::Path::removeExtension | ( | ) | const [inline] |
This function removes the extension (including '.').
Definition at line 233 of file cel_filepath.h.
| bool Celartem::Path::doesExist | ( | ) | const [inline] |
This function checks whether the file exists or not.
true if the file exists, otherwise false. Definition at line 243 of file cel_filepath.h.
| bool Celartem::Path::isDirectory | ( | ) | const [inline] |
This function checks whether the specified path is a directory or not.
true if the path is a directory, otherwise false. Definition at line 254 of file cel_filepath.h.
| bool Celartem::Path::deleteFile | ( | ) | const [inline] |
This function delete the file.
true if success, otherwise false. Definition at line 264 of file cel_filepath.h.
| bool Celartem::Path::overwriteWith | ( | const Path & | inSrc, | |
| bool | forceOverwrite = false | |||
| ) | const [inline] |
This function overwrite the file with the specified file; it actually does copy of the specified file.
| inSrc | The copy source file. | |
| forceOverwrite | if the parameter is true, then this function overwrites the existing file, otherwise the function fails. |
true if success, otherwise false. Definition at line 280 of file cel_filepath.h.
| bool Celartem::Path::replaceWith | ( | const Path & | inReplacer | ) | const [inline] |
This function replaces the file with another file.
| inReplacer | File name that specifies the file that overwrites the file. |
true if success, otherwise false. Definition at line 296 of file cel_filepath.h.