[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: KIO Slave for automatic ftp tranfer...
From: David Faure <faure () kde ! org>
Date: 2004-10-29 15:20:41
Message-ID: 200410291720.41974.faure () kde ! org
[Download RAW message or body]
On Friday 29 October 2004 19:08, Mario wrote:
> Am Freitag, 29. Oktober 2004 16:18 schrieben Sie:
> > Am Freitag, 29. Oktober 2004 13:50 schrieb David Faure:
> > > On Friday 29 October 2004 17:35, Mario wrote:
> > > > OK, I took a look at the api reference but I don't get happy with it,
> > > > it does not show me what to do to start creating one slave that
> > > > tranfers one file from an ftp server to the local filesystem, it's
> > > > nothing special, the only thing I want is a window or box showing the
> > > > tranfer like konqueror does !
> > >
> > > Check the Job API in KIO (kio/job.h).
> > > You want KIO::file_copy() if it's always a single file.
> >
> > Yes it is always a single file, thank you I think that's what I need,
> > sometimes the api structure is a little confusing for me, but this list
> > is great ! I will test if I can figure it out, but normally there's no
> > problem !
> >
> > Regards Mario
>
> OK I'm too stupid for KIO or somewhat, this is the code snippet which
> should do the described tranfer,
>
> KIO::file_copy ( KURL::KURL( "ftp://localhost/test.zip", 0) ,
> KURL::KURL( "file:/tmp/test.zip", 0) , -1, false, true, true) ;
No need for "KURL::", no need for the ,0 either.
> but it does nothing ! Perhaps somebody can explain a little what to do when
> starting working with KIO copy jobs !
file_copy returns a job, you need to wait for that job to finish.
Or use NetAccess, see http://developer.kde.org/documentation/books/kde-2.0-development/ch06lev1sec8.html
KIO tutorial: http://www.heise.de/ct/english/01/05/242/
--
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic