path self
for path
Get the absolute path of the script or module containing this command at parse time.
Signature
> path self {flags} (path)
Parameters
path
: Path to get instead of the current file.
Input/output types:
input | output |
---|---|
nothing | string |
Examples
Get the path of the current file
> const current_file = path self
Get the path of the directory containing the current file
> const current_file = path self .
Get the absolute form of a path relative to the current file
> const current_file = path self ../foo