[Issue 18294] New: std.path.dirName needs better documentation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 24 20:20:12 UTC 2018
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: nobody at puremagic.com
Reporter: bachmeil at 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 "/".
--
More information about the Digitalmars-d-bugs
mailing list