Skip to content

parent_dir

Extracts the parent directory from a file path.

parent_dir(x:string) -> string

The parent_dir function returns the parent directory path of the given file path, excluding the file name.

Extract the parent directory from a file path

Section titled “Extract the parent directory from a file path”
from {x: parent_dir("/path/to/log.json")}
{x: "/path/to"}

file_name