design question, why not always use 'cp --remove-destination'?

Frederik Eaton frederik at
Tue Aug 22 11:37:27 EDT 2006

On Tue, Aug 22, 2006 at 06:16:39PM +0300, Krasimir Angelov wrote:
> On 8/22/06, Frederik Eaton <frederik at> wrote:
> >Perhaps the "Text file busy" error is Unix-specific, but I can imagine
> >cases where somebody (other than the OS) might open a file with a
> >well-known name and read from various parts of it, and expect it not
> >to change underneath them...
> Then he/she may expect that the file will not be suddenly unlinked
> while he/she is still reading. 

I hardly know anything about Windows. Doesn't it have inodes, so I can
open a file, unlink it, and continue to read from and write to it?

> The documentation for System.IO says that the implementation should
> provide single writer - multiple readers locking. When that is the
> case then copyFile should fail if the target fail is open for
> reading or writing from someone including the OS. The Unix
> implementation provides only local locking but the Windows
> implementation provides system wide locking.


More information about the Libraries mailing list