dirname

dirname(path)

Return directory component of path. Like R’s dirname().