You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 calls GetFullPathnameA, which doesn't appear to do anything related to user expansion and is also the function called to implement resolve-file.
file-type on Windows will never return #"link". Windows has had symlinks since Vista. Looks like we can use FILE_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.
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?
Some issues I've noticed while doing a bit of work on the System library:
expand-pathnameis 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-typeon Windows will never return#"link". Windows has had symlinks since Vista. Looks like we can useFILE_ATTRIBUTE_REPARSE_POINTto determine whether a file is a symlink.rename-filepiss and moan about having to check if the destination exists. We might be able to avoid that if RENAME_EXCL is commonly supported.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.#"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-directoryor something.directory-empty?returns true if the directory doesn't exist. Why is it not an error?