www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18294] New: std.path.dirName needs better documentation


          Issue ID: 18294
           Summary: std.path.dirName needs better documentation
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P1
         Component: dlang.org
          Assignee: nobody puremagic.com
          Reporter: bachmeil yahoo.com

std.path.dirName has no examples. The documentation is incomplete, because the
function can yield surprising output.

std.path.dirName("foo/bar/baz") returns "foo/bar".
std.path.dirName("foo/bar/baz/") also return "foo/bar", even though "baz/" is
clearly a directory.

The only documentation is "Returns the directory part of a path." It should be
clarified that the end of the path is always assumed to be a file, even if it
ends with "/".

Jan 24 2018