On Tue, 2005-05-17 at 09:26 +0100, tim panton wrote: > On 16 May 2005, at 22:54, Jean-Denis Girard wrote: > > > Andres Paglayan a écrit : > > > >> File::copy does copy, it re-writes the file, > >> you need to move it. > >> so when the the pointer is placed the file is already there. > >> > > > > Well from File::Copy man page, about the move() function: > > "If possible, move() will simply rename the file." > > > I thought it was the case on Linux, but I'll probably change to > > system(mv ...) just to be sure. > > > > The 'if possible' thing relates to filesystem design. > Almost all of the native UNIX filesystems support mv as an atomic action > - but only within the same filesystem. > (Imagine you create the file on one physical disk then 'move' it > onto a different disk - the kernel has no option but to > copy the file). > > So create your file in a temp directory on the _same_ file system as > the destination, then do the move. > > If your filesystem is remote (samba or nfs) or non unix native (FAT) > then it just won't work. > > Tim. > > > > Thanks for all the replies. > > Jean-Denis > > > > _______________________________________________ > > Asterisk-Users mailing list > > Asterisk-Users@lists.digium.com > > http://lists.digium.com/mailman/listinfo/asterisk-users > > To UNSUBSCRIBE or update options visit: > > http://lists.digium.com/mailman/listinfo/asterisk-users > > > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users