Kon Lovett scripsit: > This comes down to a question of platform abstraction. Which I > suspect is the unspoken point of Mario's. We do need to remember that > whatever their compatibility layers/modes Win32 & MacOS X are not > unix. But Chicken does seem to have a bent for providing a common > filesystem view so '(file-exists? ".\\")' probably should work on > Windows, with a little help from special case handling.
I think a lot of help is required to get this right. You can strip trailing backslashes and slashes (Win32 will accept either as a path delimiter), but faking . and .. in volume roots is not simple. In particular, "J:\\" might not be a root if it's a mount point (Windows does have those), and "\\\\foo\\c$" is the root directory of C: on the local network system named "foo"; the name conventionally ends in "$" but need not. IMHO it is not worth working so hard to get this corner case correct; you will end up reimplementing half of Cygwin. > Since I use MinGW I think I link w/ the system dlls so the '_stat' > implementation is native. I does appear to handle "." & ".." > pathnames "correctly", given your point about the trailing directory > separator above. Are you sure? "." and ".." really do exist in directories that aren't volume roots. Try accessing "C:\\.". -- John Cowan [EMAIL PROTECTED] http://www.ccil.org/~cowan Most languages are dramatically underdescribed, and at least one is dramatically overdescribed. Still other languages are simultaneously overdescribed and underdescribed. Welsh pertains to the third category. --Alan King _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
