-
- Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
OS (stdlib)Related to OS modules in standard libraryRelated to OS modules in standard libraryStandard Library
Description
- bug 2:
- parentDir("a/b//")==a/b is a bug
(but parentDir("a/b/") == a is OK)
EDIT: fixed
- bug 3:
echo parentDir("/")
empty, which is a bug
rdmd --eval 'std.path.dirName("/").writeln'
/
os.path.split("/")
('/', '')
Curiously, echo splitFile("/") is correct:
(dir: "/", name: "", ext: "")
shouldn'tparentDirbe implemented in terms of splitFile? or is that for efficiency optimization ? (if so, see [WIP] nim needs a slice type analag to D'sT[]dynamic array #8256)
EDIT: still not fixed; whichever convention is used, splitFile vs parentDir still disagree
- bug 4:
echo parentDir("/a.txt")
empty, which is a bug (and inconsistent with splitFile)
EDIT: still not fixed
-
bug 5
splitFile documentation says: "dir does not end in DirSep" but should say "dir does not end in DirSep" unless it's "/"
EDIT: still not fixed -
bug 6 [NEW]
parentDir("foo") returns""instead of"."
NOTE: D and python differ for the following case:
D: rdmd --eval 'std.path.dirName("/a/a/").writeln' /a python: os.path.split("/a/a/") ('/a/a', '') nim: echo parentDir("/a/a/") /a that one should be documented
- bug 7:
parentDir(".") is empty instead of ".."
parentDir("..") is empty instead of "../.."
Metadata
Metadata
Assignees
Labels
OS (stdlib)Related to OS modules in standard libraryRelated to OS modules in standard libraryStandard Library