new GdfsPath(pathname)
Gdfs Path class.
Parameters:
Name | Type | Description |
---|---|---|
pathname |
string | undefined | initial path. |
- Source:
Methods
(static) merge(paths) → {GdfsPath}
Create a new path object with joining the two paths.
Parameters:
Name | Type | Description |
---|---|---|
paths |
Array.<GdfsPath> | The paths to join. |
- Source:
Returns:
The path that was joined.
- Type
- GdfsPath
elements() → {Array.<string>}
Get paths elements.
- Source:
Returns:
the elements.
- Type
- Array.<string>
getFilename() → {string}
Get filename part of path.
- Source:
Returns:
A filename.
- Type
- string
getPathPart() → {GdfsPath}
Get a part of path.
- Source:
Returns:
A path object including only path.
- Type
- GdfsPath
isAbsolute() → {Boolean}
Returns if this represents an absolute path.
- Source:
Returns:
True if this represents an absolute path, otherwise false.
- Type
- Boolean
isDirSpec() → {Boolean}
Returns if this represents a directory.
- Source:
Returns:
True if this represents a directory, otherwise false.
- Type
- Boolean
parse(pathname) → {undefined}
Set a path repersented by a string.
Parameters:
Name | Type | Description |
---|---|---|
pathname |
string | A path name to parse |
- Source:
Returns:
- Type
- undefined
toString() → {string}
Returns a path represented by string.
- Source:
Returns:
The path that this is representing.
- Type
- string