root_path
root_path — strips the final file or directory name from a path.
root_path (path)
pathA file path name, as a string.
The portion of the path with the file name and any
trailing directory separators removed.
This function strips the final file or directory name from the
path to produce its parent. Any trailing
directory separators are also removed. If the path
represents the root of the file system then it is unmodified.
Gamma>x = "/usr/doc/FAQ";"/usr/doc/FAQ"Gamma>x = root_path(x);"/usr/doc"Gamma>x = root_path(x);"/usr"Gamma>x = root_path(x);"/"Gamma>x = root_path(x);"/"Gamma>