# class FileJob

###

Module | kio
Namespace | KIO
Class | FileJob
Inherits | KIO::SimpleJob

The file-job is an asynchronious version of normal file handling. It allows block-wise reading and writing, and allows seeking. Results are returned through signals.

Should always be created using KIO.open(KUrl&)

### methods

- FileJob (dd)

  returns ctor
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  dd | FileJobPrivate |

- FileJob ( )

  returns ctor
  Not implemented
  before KDE 4.1.0 only

- close ( )

  returns Nothing

  Close

  Closes the file-slave

- close (job)

  returns Nothing
  SIGNAL ("close (Job*)")

  Argument | Type | Default
  --- | --- | ---
  job | KIO.Job |

  File is closed and will accept no more commands

  job - the job that emitted this signal

- data (job, data)

  returns Nothing
  SIGNAL ("data (Job*, const QByteArray&)")

  Argument | Type | Default
  --- | --- | ---
  job | KIO.Job |
  data | QByteArray |

  Data from the slave has arrived.

  job - the job that emitted this signal

  data - data received from the slave.

- mimetype (job, type)

  returns Nothing
  SIGNAL ("mimetype (Job*, const QString&)")

  Argument | Type | Default
  --- | --- | ---
  job | KIO.Job |
  type | QString |

  Mimetype determined.

  job - the job that emitted this signal

  type - the mime type

- open (job)

  returns Nothing
  SIGNAL ("open (Job*)")

  Argument | Type | Default
  --- | --- | ---
  job | KIO.Job |

  File is open, metadata has been determined and the file-slave is ready to receive commands.

  job - the job that emitted this signal

- position (job, offset)

  returns Nothing
  SIGNAL ("position (Job*, filesize_t)")

  Argument | Type | Default
  --- | --- | ---
  job | KIO.Job |
  offset | KIO.filesize_t |

  The file has reached this position. Emitted after seek.

  job - the job that emitted this signal

  offset - the new position

- read (size)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  size | KIO.filesize_t |

  Read block

  The slave emits the data through data().

  size - the requested amount of data

- redirection (job, url)

  returns Nothing
  SIGNAL ("redirection (Job*, const KUrl&)")

  Argument | Type | Default
  --- | --- | ---
  job | KIO.Job |
  url | KUrl |

  Signals the file is a redirection. Follow this url manually to reach data

  job - the job that emitted this signal

  url - the new URL

- seek (offset)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  offset | KIO.filesize_t |

  Seek

  The slave emits position()

  offset - the position from start to go to

- size ( )

  returns KIO.filesize_t

  Size

  Returns the file size

- write (data)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  data | QByteArray |

  Write block

  data - the data to write

- written (job, written)

  returns Nothing
  SIGNAL ("written (Job*, filesize_t)")

  Argument | Type | Default
  --- | --- | ---
  job | KIO.Job |
  written | KIO.filesize_t |

  Bytes written to the file.

  job - the job that emitted this signal

  written - bytes written.