Index | | | Related pages | | | Classes | | | Functions | | | Entities | | | Function Sets | | | Groups |
class Path( [path] )
Interface to local filesystem path definition. more...
Properties | |
extension | File extension part. |
file | File part. |
filename | File name part. |
location | Location specificator. |
path | Complete path. |
unit | Unit specificator. |
Constructor | |
init | Constructor for the Path class. |
This class offers an object oriented interface to access path elements given a complete path, or to build a path from its elements.
extension |
File extension part.
This element coresponds to the first last of the file element, if it is divided into a filename and an extension by a "." dot. |
file |
File part.
This is the part of the path that identifies an element in a directory. It includes everything after the last "/" path separator. |
filename |
File name part.
This element coresponds to the first part of the file element, if it is divided into a filename and an extension by a "." dot. |
location |
Location specificator.
This is the "path to file". It can start with a "/" or not; if it starts with a "/" it is considered absolute. |
path |
Complete path.
This is the complete path referred by this object. |
unit |
Unit specificator.
This is the unit specificator (disk name) used in some filesystems. It is separated by the rest of the path via a ":". According to RFC 3986 it always starts with a "/", which is automatically added if absent. |
Constructor for the Path class.
Path.init( [path] ) | |||
path | The path that will be used as initial path. | ||
Raises: |
|
Builds the path object, optionally using the given parameter as a complete path constructor.
If the parameter is an array, it must have at least four string elements, and it will be used to build the path from its constituents. In example:
unit = "C" location = "/a/path/to" file = "somefile" ext = "anext" p = Path( [ unit, location, file, ext ] ) @endocde @b nil can be passed if some part of the specification is not used. @note Use the fileNameMerge() function to simply merge elements of a path specification into a string. @see fileNameMerge
Index | | | Related pages | | | Classes | | | Functions | | | Entities | | | Function Sets | | | Groups |