Filesystem
The Filesystem registry allows for efficient interaction with the file system, providing functions to read, write, and manipulate files directly from your templates.
pathBase
{{ "/path/to/file.txt" | pathBase }} // Output: "file.txt"pathDir
{{ "/" | pathDir }} // Output: "/"
{{ "/path/to/file.txt" | pathDir }} // Output: "/path/to"pathExt
{{ "/" | pathExt }} // Output: ""
{{ "/path/to/file.txt" | pathExt }} // Output: ".txt"pathClean
pathIsAbs
osBase
osDir
osExt
osClean
osIsAbs
Last updated