Inheritance diagram for FilePath:
Public Member Functions | |
this (FilePath other) | |
this (Uri uri) | |
this (char[] filepath) | |
void | reset () |
bool | isAbsolute () |
char[] | getRoot () |
char[] | getPath () |
char[] | getName () |
char[] | getExtension () |
char[] | getSuffix () |
char[] | toString () |
MutableUri | toUri () |
void | write (IWriter writer) |
char[] | toUtf8 () |
wchar[] | toUtf16 () |
char[] | splice (FilePath base) |
IBuffer | splice (FilePath base, IBuffer buf) |
FilePath | toParent () |
bool | isChild () |
FilePath | toSibling (char[] name) |
FilePath | toSibling (char[] name, char[] ext) |
FilePath | toSibling (char[] name, char[] ext, char[] suffix) |
Protected Member Functions | |
this () | |
Private Member Functions | |
int | locateParent () |
Private Attributes | |
char[] | fp |
char[] | ext |
char[] | name |
char[] | path |
char[] | root |
char[] | suffix |
wchar[] | fpWide |
Static Private Attributes | |
const int | MaxFilePathSize = 1024 |
File paths containing non-ansi characters should be UTF-8 encoded. Supporting Unicode in this manner was deemed to be more suitable than providing a wchar version of FilePath, and is both consistent & compatible with the approach taken with the Uri class.
Definition at line 68 of file FilePath.d.
|
Create an empty FilePath. This is strictly for subclass use. Reimplemented in MutableFilePath. Definition at line 91 of file FilePath.d. |
|
Create a FilePath through reference to another. Reimplemented in MutableFilePath. Definition at line 101 of file FilePath.d. |
|
Create a FilePath from a Uri. Note that the Uri authority is used to house an optional root (device, drive-letter ...) Definition at line 121 of file FilePath.d. |
|
Create a FilePath from the given string. Note the path is not duplicated here, so you are expected to provide an immutable copy for the lifetime of this object. If you're not certain, duplicate the path first. Definition at line 141 of file FilePath.d. |
|
Definition at line 223 of file FilePath.d. Referenced by toParent(), toSibling(), and toUtf8(). |
|
Returns true if this FilePath is *not* relative to the current working directory. Definition at line 236 of file FilePath.d. References root. |
|
Return the root of this path. Roots are constructs such as "c:". Definition at line 250 of file FilePath.d. References root. |
|
Return the file path. Paths start with a '/' but do not end with one. The root path is empty. Directory paths are split such that the directory name is placed into the 'name' member. Definition at line 264 of file FilePath.d. |
|
Return the name of this file, or directory. Definition at line 275 of file FilePath.d. Referenced by testScanFiles(). |
|
Return the file-extension, sans seperator Definition at line 286 of file FilePath.d. Referenced by ServletResponse::copyFile(), and testScanFiles(). |
|
Suffix is like extension, except it can include multiple '.' sequences. For example, "wumpus1.foo.bar" has suffix "foo.bar" and extension "bar". Definition at line 299 of file FilePath.d. References suffix. |
|
Convert this FilePath to a char[]. This is expected to execute optimally in most cases. Definition at line 311 of file FilePath.d. References IBuffer::append(), Buffer::append(), Buffer, ext, fp, MaxFilePathSize, root, version, and write(). Referenced by FileBucket::Record::eof(), and FileProxy::toString(). |
|
Convert this FilePath to a Uri. Note that a root (such as a drive-letter, or device) is placed into the Uri authority Definition at line 353 of file FilePath.d. References ext, root, MutableUri::setHost(), MutableUri::setPath(), MutableUri::setScheme(), and version. Referenced by testFilePath(). |
|
Write this FilePath to the given IWriter. This makes the FilePath compatible with all Writers Reimplemented from IWritable. Definition at line 380 of file FilePath.d. References ext, IWriter::put, and root. Referenced by toString(). |
|
Return a zero terminated version of this file path. Note that the compiler places a zero at the end of each static string, as does the allocator for char[] requests. In typical usage, this will not need to duplicate the path Definition at line 406 of file FilePath.d. Referenced by FileConduit::VersionPosix::_open(), FileProxy::VersionPosix::createDirectory(), FileProxy::VersionPosix::createFile(), FileProxy::VersionPosix::getInfo(), FileProxy::VersionPosix::remove(), FileSystem::VersionPosix::setDirectory(), and FileProxy::VersionPosix::toList(). |
|
|
Splice this FilePath onto the end of the provided base path. Output is return as a char[]. Definition at line 438 of file FilePath.d. References Buffer, and MaxFilePathSize. |
|
Splice this FilePath onto the end of the provided base path. Output is placed into the provided IBuffer. Definition at line 450 of file FilePath.d. References IBuffer::append(), ext, name, path, and root. |
|
Find the next parent of the FilePath. Returns a valid index to the seperator when present, -1 otherwise. Definition at line 480 of file FilePath.d. Referenced by toParent(). |
|
Returns a FilePath representing the parent of this one. An exception is thrown if there is not parent (at the root). Definition at line 499 of file FilePath.d. References FilePath, locateParent(), path, and reset(). |
|
Returns true if this FilePath has a parent. Definition at line 524 of file FilePath.d. |
|
Return a cloned FilePath with a different name. Definition at line 535 of file FilePath.d. Referenced by toSibling(). |
|
Return a cloned FilePath with a different name and extension. Note that the suffix is destroyed. Definition at line 547 of file FilePath.d. References suffix, and toSibling(). |
|
Return a cloned FilePath with a different name, extension, and suffix. Definition at line 559 of file FilePath.d. |
|
Definition at line 70 of file FilePath.d. Referenced by toString(), and toUtf8(). |
|
Definition at line 70 of file FilePath.d. Referenced by splice(), toSibling(), toString(), toUri(), and write(). |
|
Definition at line 70 of file FilePath.d. Referenced by splice(), and toSibling(). |
|
Definition at line 70 of file FilePath.d. Referenced by splice(), and toParent(). |
|
Definition at line 70 of file FilePath.d. Referenced by getRoot(), isAbsolute(), splice(), toString(), toUri(), and write(). |
|
Definition at line 70 of file FilePath.d. Referenced by getSuffix(), and toSibling(). |
|
Definition at line 77 of file FilePath.d. |
|
Definition at line 82 of file FilePath.d. Referenced by splice(), and toString(). |