NetAccess::file_copy and modification time

Andras Mantia amantia at kde.org
Fri Jun 18 17:09:21 BST 2004


On Friday 18 June 2004 16:33, David Faure wrote:
> On Friday 18 June 2004 13:40, Andras Mantia wrote:
> > On Friday 18 June 2004 14:09, you wrote:
> > > So is there a (simple) way to do an overwriting copy by
> > > preserving the modification time or do I have to use KIO::copy
> > > and be sure that the target does not exists?
> >
> > I was wrong, there is no difference between file_copy and copy.
> > Modification time is not preserved when the copy is from a remote
> > file (possibly it isn't also when the copy is to a remote file). So
> > the question is: is it possible to preserve the modification time
> > when copying from/to a remote file?
>
> Currently the utime() is done by kio_file when copying from local to
> local, indeed.
>
> Doing it from file_copy, when doing a get() and a put(), sounds
> impossible. It's too low-level. It could be done from CopyJob, since
> that one lists the sources (or stat()s it, for a single file), so it
> knows the atime/mtime. We would need a new special() call (or a
> better named call in KDE4) to set the atime/mtime over any
> protocol.... It's mostly for kio_file as destination though. Is that
> enough information for the patch you're about to write? :-P

Well, I would need such functionality in KDE 3.2 and above, so... 
Anyway, it means that I need to find another solution for my original 
problem, but I mark your mail and after 3.3 I may look at the 
KIO::CopyJob sources to make this work.

Andras

-- 
Quanta Plus developer - http://quanta.sourceforge.net
K Desktop Environment - http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040618/d8b9cd01/attachment.sig>


More information about the kde-core-devel mailing list