Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 783 Bytes

dirname.markdown

File metadata and controls

35 lines (24 loc) · 783 Bytes
layout title categories published alias tags
default
dirname
Reference
Functions
dirname
true
reference-functions-dirname.html
reference
files functions
functions
dirname

Prototype: dirname(path)

Return type: string

Description: Return the parent directory name for given path.

This function returns the directory name for path. If path is a directory, then the name of its parent directory is returned.

Arguments:

  • path : File path, in the range .*

Example:

    vars:
      "apache_dir" string => dirname("/etc/apache2/httpd.conf");

Notes:

History: Was introduced in 3.3.0, Nova 2.2.0 (2011)

See also: [lastnode()][lastnode], [filestat()][filestat], [splitstring()][splitstring].