-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Labels
Description
Some issues I've noticed while doing a bit of work on the System library:
-
expand-pathname
is totally different on Unix and Windows. Unix only expands "~" and "~user" in the first element of a relative path. Windows only callsGetFullPathnameA
, which doesn't appear to do anything related to user expansion and is also the function called to implementresolve-file
. -
file-type
on Windows will never return#"link"
. Windows has had symlinks since Vista. Looks like we can useFILE_ATTRIBUTE_REPARSE_POINT
to determine whether a file is a symlink. - Comments in
rename-file
piss and moan about having to check if the destination exists. We might be able to avoid that if RENAME_EXCL is commonly supported. - Similar comments in
copy-file
. See copy-file is implemented by shelling out to /bin/cp on Unix platforms #1649 and check for something similar to RENAME_EXCL. - Define constants for the supported file properties. Easy to misspell
#"writeable?"
, particularly easy to leave off the?
. -
do-directory(fn, dir, descend?: #t, match: glob("*.dylan"))
would be nice rather than having to recurse manually. Or could be a new function,scan-directory
or something. -
directory-empty?
returns true if the directory doesn't exist. Why is it not an error?