On 6 Mar 2001, Assar Westerlund wrote:
> Mike Castle <[EMAIL PROTECTED]> writes:
> > On Sun, Mar 04, 2001 at 06:32:25AM +0100, Jim Meyering wrote:
> > > Do you know of a system on which such a use of rename is _not_ atomic?
> >
> > NT. (NT will happily rename() across disks, hardly an atomic operation).
>
> What rename() is that? It's not the one in their posix library I
> assume? Is there a rename function in any of the ordinary set of libraries.
I'd have to argue that NT has no POSIX library (having looked at it a
while back). But rename is documented:
The rename function renames the file or directory specified by oldname to
the name given by newname. The old name must be the path of an existing
file or directory. The new name must not be the name of an existing file
or directory. You can use rename to move a file from one directory or
device to another by giving a different path in the newname argument.
However, you cannot use rename to move a directory. Directories can be
renamed, but not moved
--
T.E.Dickey <[EMAIL PROTECTED]>
http://dickey.his.com
ftp://dickey.his.com