dirname
dirname(path)
This function returns all but the last level of the path name in path. If path does not contain any path name components, the function returns the null string. dirname includes a trailing path separator as the last character of the string to permit easy construction of path names, for example,
Example
dirname(doc_path(doc)) . "test.sgm"
Related Topics