Questions on the new KIO::FileJob API
vladc6 at yahoo.com
Sun Jul 27 08:38:13 BST 2008
--- On Wed, 5/14/08, Allan Sandfeld Jensen <kde at carewolf.com> wrote:
> > > 2) - Reading Files: From reading the code in
> kio_file i'm not sure
> > > whether data() is supposed to emit all the
> requested data in a
> > > single
> > > callback
> > Yes, one data() should emit all the requested data,
> unless the slave
> > reaches EOF, in which case it returns all the data up
> to the EOF.
> No. A read can result in any number data() emits. For files
> it will usually be
> only one, but for streams it can be multiple.
Does FileJob::write() work the same way? In other words, do we have to check whether bytes_written == the number of bytes sent, and if not, then attempt again to write what is left over?
More information about the kde-core-devel