https://issues.dlang.org/show_bug.cgi?id=18294
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: [email protected]
Reporter: [email protected]
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 "/".
--