VirtualPath
Hierarchy
- Path
- VirtualPath
Index
Constructors
constructor
Properties
staticDELIMITER
staticSEP
Methods
append
Append path parts to the end of the current path and return a new
Path
instance.
equals
Returns true if both paths are equal using strict equality.
exists
Return true if the current path exists.
ext
Return the extension (if applicable) with or without leading period.
isAbsolute
Return true if the current path is absolute.
isDirectory
Return true if the current path is a folder.
isFile
Return true if the current path is a file.
name
Return the file name (with optional extension) or folder name.
parent
Return the parent folder as a new
Path
instance.
path
Return the current module path as a normalized string, converting all path separators to "/".
prepend
Prepend path parts to the beginning of the current path and return a new
Path
instance.
realPath
Returns a canonical path by resolving directories and symlinks.
relativeTo
Return a new relative
Path
instance from the current "from" path to the defined "to" path.
resolve
Return a new
Path
instance where the current path is accurately resolved against the defined working directory.
toJSON
toString
staticcreate
Create and return a new
Path
instance.
staticpath
Convert a path-like value to a formatted virtual path string.
staticresolve
Like
create()
but also resolves the path against a working directory.
An immutable class for operating on file system paths, that always normalize using a forward slash ("/") for path separators. Useful for paths found in configurations, globs, etc.