# class CopyJob

###

Module | kio
Namespace | KIO
Class | CopyJob
Inherits | KIO::Job

CopyJob is used to move, copy or symlink files and directories. Don't create the job directly, but use KIO.copy(), KIO.move(), KIO.link() and friends.

See also KIO.copy()

See also KIO.copyAs()

See also KIO.move()

See also KIO.moveAs()

See also KIO.link()

See also KIO.linkAs()

### enums

- CopyMode { Copy, Move, Link }

enum details

### methods

- CopyJob (dd)

  returns ctor
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  dd | CopyJobPrivate |

- CopyJob ( )

  returns ctor
  Not implemented
  before KDE 4.1.0 only

- aboutToCreate (job, files)

  returns Nothing
  SIGNAL ("aboutToCreate (Job*, const QList<KIO::CopyInfo>&)")

  Argument | Type | Default
  --- | --- | ---
  job | KIO.Job |
  files | QList<KIO::CopyInfo> |

  Emitted when it is known which files / directories are going to be created. Note that this may still change e.g. when existing files with the same name are discovered.

  job - the job that emitted this signal

  files - a list of items that are about to be created.

- copying (job, src, dest)

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

  Argument | Type | Default
  --- | --- | ---
  job | KIO.Job |
  src | KUrl |
  dest | KUrl |

  The job is copying a file or directory.

  Note: This signal is used for progress dialogs, it's not emitted for every file or directory (this would be too slow), but every 200ms.

  job - the job that emitted this signal

  src - the URL of the file or directory that is currently being copied

  dest - the destination of the current operation

- copyingDone (job, from, to, mtime, directory, renamed)

  returns Nothing
  SIGNAL ("copyingDone (Job*, const KUrl&, const KUrl&, time_t, bool, bool)")

  Argument | Type | Default
  --- | --- | ---
  job | KIO.Job |
  from | KUrl |
  to | KUrl |
  mtime | time_t |
  directory | bool |
  renamed | bool |

  The job emits this signal when copying or moving a file or directory successfully finished. This signal is mainly for the Undo feature. If you simply want to know when a copy job is done, use result().

  job - the job that emitted this signal

  from - the source URL

  to - the destination URL

  mtime - the modification time of the source file, hopefully set on the destination file too (when the kioslave supports it).

  directory - indicates whether a file or directory was successfully copied/moved. true for a directory, false for file

  renamed - indicates that the destination URL was created using a rename operation (i.e. fast directory moving). true if is has been renamed

- copyingLinkDone (job, from, target, to)

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

  Argument | Type | Default
  --- | --- | ---
  job | KIO.Job |
  from | KUrl |
  target | QString |
  to | KUrl |

  The job is copying or moving a symbolic link, that points to target. The new link is created in to. The existing one is/was in from. This signal is mainly for the Undo feature.

  job - the job that emitted this signal

  from - the source URL

  target - the target

  to - the destination URL

- creatingDir (job, dir)

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

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

  The job is creating the directory dir.

  This signal is emitted for every directory being created.

  job - the job that emitted this signal

  dir - the directory that is currently being created

- destUrl ( )

  returns KUrl

  Returns the destination URL. Returns the destination URL

- doSuspend ( )

  returns bool

  Reimplemented for internal reasons

- linking (job, target, to)

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

  Argument | Type | Default
  --- | --- | ---
  job | KIO.Job |
  target | QString |
  to | KUrl |

  The job is creating a symbolic link.

  Note: This signal is used for progress dialogs, it's not emitted for every file or directory (this would be too slow), but every 200ms.

  job - the job that emitted this signal

  target - the URL of the file or directory that is currently being linked

  to - the destination of the current operation

- moving (job, from, to)

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

  Argument | Type | Default
  --- | --- | ---
  job | KIO.Job |
  from | KUrl |
  to | KUrl |

  The job is moving a file or directory.

  Note: This signal is used for progress dialogs, it's not emitted for every file or directory (this would be too slow), but every 200ms.

  job - the job that emitted this signal

  from - the URL of the file or directory that is currently being moved

  to - the destination of the current operation

- operationMode ( )

  returns KIO::CopyJob.CopyMode
  KDE 4.1.0 and later only

  Returns the mode of the operation (copy, move, or link), depending on whether KIO.copy(), KIO.move() or KIO.link() was called.

- processedDirs (job, dirs)

  returns Nothing
  SIGNAL ("processedDirs (Job*, unsigned long)")

  Argument | Type | Default
  --- | --- | ---
  job | KIO.Job |
  dirs | unsigned long |

  Sends the number of processed directories.

  job - the job that emitted this signal

  dirs - the number of processed dirs

- processedFiles (job, files)

  returns Nothing
  SIGNAL ("processedFiles (Job*, unsigned long)")

  Argument | Type | Default
  --- | --- | ---
  job | KIO.Job |
  files | unsigned long |

  Sends the number of processed files.

  job - the job that emitted this signal

  files - the number of processed files

- renamed (job, from, to)

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

  Argument | Type | Default
  --- | --- | ---
  job | KIO.Job |
  from | KUrl |
  to | KUrl |

  The user chose to rename from to to.

  job - the job that emitted this signal

  from - the original name

  to - the new name

- setDefaultPermissions (b)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  b | bool |

  By default the permissions of the copied files will be those of the source files.

  But when copying "template" files to "new" files, people prefer the umask to apply, rather than the template's permissions. For that case, call setDefaultPermissions(true)

- slotResult (job)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  job | KJob |

- srcUrls ( )

  returns KUrl.List

  Returns the list of source URLs. Returns the list of source URLs.

- totalDirs (job, dirs)

  returns Nothing
  SIGNAL ("totalDirs (KJob*, unsigned long)")

  Argument | Type | Default
  --- | --- | ---
  job | KJob |
  dirs | unsigned long |

  Emitted when the toal number of direcotries is known.

  job - the job that emitted this signal

  dirs - the total number of directories

- totalFiles (job, files)

  returns Nothing
  SIGNAL ("totalFiles (KJob*, unsigned long)")

  Argument | Type | Default
  --- | --- | ---
  job | KJob |
  files | unsigned long |

  Emitted when the total number of files is known.

  job - the job that emitted this signal

  files - the total number of files

### enums - detail

- CopyMode { Copy, Move, Link }

  Defines the mode of the operation

  | Copy | - | - |
  | Move | - | - |
  | Link | - | - |