#353 closed enhancement (fixed)
file-copy does not what I'd think when used on directories
Reported by: | Moritz Heidkamp | Owned by: | felix winkelmann |
---|---|---|---|
Priority: | minor | Milestone: | 4.9.0 |
Component: | core libraries | Version: | 4.5.x |
Keywords: | Cc: | ||
Estimated difficulty: |
Description
Currently, file-copy
used on a directory will create an empty regular file. It is certainly true that one should not expect it to work on directories but I think signalling an error or returning #f
when doing so would be more sensible than the current behavior.
Change History (6)
comment:1 Changed 14 years ago by
Milestone: | 4.6.0 → 4.7.0 |
---|---|
Owner: | set to felix winkelmann |
Priority: | not urgent at all → minor |
Status: | new → assigned |
comment:2 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 follow-up: 4 Changed 14 years ago by
Didn't file-move do the right thing when used on directories? It'd be a shame if that worked before but now throws an error. I don't know how it works on Windows, but in Unix moving is renaming. Or do we have a separate procedure for that?
comment:4 Changed 14 years ago by
Replying to sjamaan:
Didn't file-move do the right thing when used on directories? It'd be a shame if that worked before but now throws an error. I don't know how it works on Windows, but in Unix moving is renaming. Or do we have a separate procedure for that?
file-copy
and file-move
only copy/move files by manually reading writing blocks of data. Mostly useless.
rename-file
(library unit) does a proper rename(2)
system call.
file-copy
andfile-move
signal an error if used on a directory, now. See "experimental" branch.