Skip to main content
Version: Next

parent_dir

Extracts the parent directory from a file path.

parent_dir(x:string) -> string

Description

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

Examples

Extract the parent directory from a file path

from {x: parent_dir("/path/to/log.json")}
{x: "/path/to"}

See Also

file_name