-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What does p:file-copy do with special files? #477
Comments
I wonder if the following is sufficient.
|
For symbolic links it’s maybe sufficient to have a boolean option If If a symlink is dangling and Hard links: Files they point to will be treated as regular files, as if there were no hard link. I’m not sure whether hard links for other items (directories, block devices, etc.) exist, but I think they should be treated as the items they point to. Special files (devices etc.): implementation-defined |
I don't think hard links are an issue. Those are implemented (at least in Unix) by having different directory entries point to the same inode on disk. I think there's a reference count, but I don't believe there's anything about one entry that can lead you to the other. (Short of reading the whole disk, naturally.) I suppose we could add a dereference links option. Defaults to... |
Curiously, a naive application of I'm not recommending that behavior, I'm just saying it's curious. |
What should
p:file-copy
do with symbolic links, block devices, character devices, etc.?Is that implementation defined?
Do we expect
<p:file-copy href="/dev" target="/tmp/dev"/>
to succeed on a Unix box?Symbolic links are both the more likely problem and the more complicated one. Given:
What is
<p:file-copy href="/tmp/x/copytest" target="/tmp/x/result"/>
supposed to produce, assuming/tmp/x/result
does not exist before the operation begins?(Extra credit: consider how this should work on Windows boxes with the various NTFS filesystem features.)
The text was updated successfully, but these errors were encountered: