[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Extended KIO::KFileCopyJob
From:       David Faure <david () mandrakesoft ! com>
Date:       2002-02-19 20:00:17
[Download RAW message or body]

On Monday 18 February 2002 15:32, Julian Rockey wrote:
> As part of a small application I am developing, I found that KFileCopyJob 
> relies on the full path of the destination being present in order to perform 
> the copy. In other words, a copy from
> 
> /path/a/one/two/file.txt
> to
> /path2/b/three/four/copied_file.txt
> 
> will fail if the directory /path2/b/three/four/ is not present.
> 
> Sometimes this is not what is wanted, so I subclassed KIO::KFileCopyJob and 
> added an extra parameter autoCreateDirs, so that if autoCreateDirs is true 
> then destination directories will be created as needed.
> 
> This struck me as something that may be useful generally, not just in my 
> application - any opinions on whether it's worth me creating a patch for 
> KFileCopyJob to include this functionality? Not sure if there are binary 
> compatibility issues with adding a parameter.
> 
> I attach the subclass code for information.

I like the fact that it's a subclass so that it can't break the original FileCopyJob code ;)
(Adding an extra bool to file_copy is compatible with that: the implementation
of file_copy can create the right class depending on the bool).

However, this is definitely a new feature, and it sounds a bit late for
inclusion into kde-3.0. Especially since no core KDE app uses it, which
means it would get no testing. However I like it, and I think it should go in
after 3.0. Please resend at that time ;)

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://people.mandrakesoft.com/~david, http://www.konqueror.org
KDE 3.0: Konquering the Desktops

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic