Return the complete text of this filepath.
Does this path equate to the given text? We ignore trailing path-separators when testing equivalence.
Parse the path spec.
Parse the path spec with explicit end point. A '\' is considered illegal in the path and should be normalized out before this is invoked (the content managed here is considered immutable, and thus cannot be changed by this function.)
Pop the rightmost element off this path, stripping off a trailing '/' as appropriate:
Duplicate this path.
Ext is the tail of the filename, rightward of the rightmost '.' separator e.g. path "foo.bar" has ext "bar". Note that patterns of adjacent separators are treated specially - for example, ".." will wind up with no ext at all.
Return the name + suffix combination.
Return the file path. Paths may start and end with a "/". The root path is "/" and an unspecified path is returned as an empty string. Directory paths may be split such that the directory name is placed into the 'name' member; directory paths are treated no differently than file paths.
Returns true if this path is *not* relative to the current working directory.
Returns true if this path has a parent. Note that a parent is defined by the presence of a path-separator in the path. This means 'foo' within "/foo" is considered a child of the root.
Returns true if this FilePath is empty.
Return the name of this file, or directory.
Returns a path representing the parent of this one. This will typically return the current path component, though with a special case where the name component is empty. In such cases, the path is scanned for a prior segment:
Return the root + folder combination.
Return the root of this path. Roots are constructs such as "C:".
Suffix is like ext, but includes the separator e.g. path "foo.bar" has suffix ".bar".
Parses a file path.
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 PathParser, and is both consistent & compatible with the approach taken with the Uri class.
Note that patterns of adjacent '.' separators are treated specially in that they will be assigned to the name where there is no distinct suffix. In addition, a '.' at the start of a name signifies it does not belong to the suffix i.e. ".file" is a name rather than a suffix. Patterns of intermediate '.' characters will otherwise be assigned to the suffix, such that "file....suffix" includes the dots within the suffix itself. See method ext() for a suffix without dots.
Note also that normalization of path-separators does *not* occur by default. This means that usage of '\' characters should be explicitly converted beforehand into '/' instead (an exception is thrown in those cases where '\' is present). On-the-fly conversion is avoided because (a) the provided path is considered immutable and (b) we avoid taking a copy of the original path. Module FilePath exists at a higher level, without such contraints.