File Path Functions
While Sprig does not grant access to the filesystem, it does provide functions for working with strings that follow file path conventions.
Return the last element of a path.
The above prints “baz”
Return the directory, stripping the last part of the path. So
Clean up a path.
The above resolves the
.. and returns
Return the file extension.
The above returns
To check whether a file path is absolute, use