KIO::FileCopyJob Class Reference

`#include <jobclasses.h>`

Inheritance diagram for KIO::FileCopyJob:

## Public Slots

void | slotStart ()
void | slotData (KIO::Job *, const QByteArray &data)
void | slotDataReq (KIO::Job *, QByteArray &data)
void | slotMimetype (KIO::Job *, const QString &type)

## Signals

void | mimetype (KIO::Job *job, const QString &type)
Signals inherited from KIO::Job
void | result (KIO::Job *job)
void | canceled (KIO::Job *job)
void | infoMessage (KIO::Job *job, const QString &msg)
void | warning (KIO::Job *job, const QString &msg)
void | connected (KIO::Job *job)
void | percent (KIO::Job *job, unsigned long percent)
void | totalSize (KIO::Job *job, KIO::filesize_t size)
void | processedSize (KIO::Job *job, KIO::filesize_t size)
void | speed (KIO::Job *job, unsigned long speed)

## Public Member Functions

| FileCopyJob (const KURL &src, const KURL &dest, int permissions, bool move, bool overwrite, bool resume, bool showProgressInfo)
void | setSourceSize64 (KIO::filesize_t size)
void | setModificationTime (time_t mtime)
void | setSourceSize (off_t size) KDE_DEPRECATED
KURL | srcURL () const
KURL | destURL () const
Public Member Functions inherited from KIO::Job
virtual void | kill (bool quietly=true)
int | error () const
int | progressId () const
const QString & | errorText () const
QString | errorString () const
QStringList | detailedErrorStrings (const KURL *reqUrl=0L, int method=-1) const
void | showErrorDialog (QWidget *parent=0L)
void | setAutoErrorHandlingEnabled (bool enable, QWidget *parentWidget=0)
bool | isAutoErrorHandlingEnabled () const
void | setAutoWarningHandlingEnabled (bool enable)
bool | isAutoWarningHandlingEnabled () const
void | setInteractive (bool enable)
bool | isInteractive () const
void | setWindow (QWidget *window)
QWidget * | window () const
void | updateUserTimestamp (unsigned long time)
void | setParentJob (Job *parentJob)
Job * | parentJob () const
void | setMetaData (const KIO::MetaData &metaData)
void | addMetaData (const QString &key, const QString &value)
void | addMetaData (const QMap< QString, QString > &values)
void | mergeMetaData (const QMap< QString, QString > &values)
MetaData | outgoingMetaData () const
MetaData | metaData () const
QString | queryMetaData (const QString &key)
KIO::filesize_t | getProcessedSize ()

## Protected Slots

virtual void | slotResult (KIO::Job *job)
void | slotProcessedSize (KIO::Job *job, KIO::filesize_t size)
void | slotTotalSize (KIO::Job *job, KIO::filesize_t size)
void | slotPercent (KIO::Job *job, unsigned long pct)
void | slotCanResume (KIO::Job *job, KIO::filesize_t offset)
Protected Slots inherited from KIO::Job
virtual void | slotResult (KIO::Job *job)
void | slotSpeed (KIO::Job *job, unsigned long speed)
void | slotInfoMessage (KIO::Job *job, const QString &msg)
void | slotSpeedTimeout ()

## Protected Member Functions

void | startCopyJob ()
void | startCopyJob (const KURL &slave_url)
void | startRenameJob (const KURL &slave_url)
void | startDataPump ()
void | connectSubjob (SimpleJob *job)
virtual void | virtual_hook (int id, void *data)
Protected Member Functions inherited from KIO::Job
| Job (bool showProgressInfo)
virtual void | addSubjob (Job *job, bool inheritMetaData=true)
virtual void | removeSubjob (Job *job)
void | removeSubjob (Job *job, bool mergeMetaData, bool emitResultIfLast)
void | emitPercent (KIO::filesize_t processedSize, KIO::filesize_t totalSize)
void | emitSpeed (unsigned long speed)
void | emitResult ()
void | setProcessedSize (KIO::filesize_t size)
unsigned long | userTimestamp () const
int & | extraFlags ()

## Protected Attributes

KURL | m_src
KURL | m_dest
int | m_permissions
bool | m_move:1
bool | m_overwrite:1
bool | m_resume:1
bool | m_canResume:1
bool | m_resumeAnswerSent:1
QByteArray | m_buffer
SimpleJob * | m_moveJob
SimpleJob * | m_copyJob
TransferJob * | m_getJob
TransferJob * | m_putJob
KIO::filesize_t | m_totalSize
Protected Attributes inherited from KIO::Job
QPtrList< Job > | subjobs
int | m_error
QString | m_errorText
unsigned long | m_percent
int | m_progressId
QTimer * | m_speedTimer
QGuardedPtr< QWidget > | m_window
MetaData | m_outgoingMetaData
MetaData | m_incomingMetaData

## Additional Inherited Members

Protected Types inherited from KIO::Job
enum | { EF_TransferJobAsync = (1 << 0), EF_TransferJobNeedData = (1 << 1), EF_TransferJobDataSent = (1 << 2), EF_ListJobUnrestricted = (1 << 3) }

## Detailed Description

The FileCopyJob copies data from one place to another.

See also
  KIO::file_copy()
  KIO::file_move()

Definition at line 1250 of file jobclasses.h.

## Constructor & Destructor Documentation

FileCopyJob::FileCopyJob | ( | const KURL & | src,
|  | const KURL & | dest,
|  | int | permissions,
|  | bool | move,
|  | bool | overwrite,
|  | bool | resume,
|  | bool | showProgressInfo
| ) |  |

Do not create a FileCopyJob directly.

Use KIO::file_move() or KIO::file_copy() instead.

Parameters

  src | the source URL
  dest | the destination URL
  permissions | the permissions of the resulting resource
  move | true to move, false to copy
  overwrite | true to allow overwriting, false otherwise
  resume | true to resume an operation, false otherwise
  showProgressInfo | true to show progress information to the user

Definition at line 1556 of file job.cpp.

## Member Function Documentation

KURL KIO::FileCopyJob::destURL | ( |  | ) | const

inline

Returns the destination URL.

Returns
  the destination URL

Definition at line 1301 of file jobclasses.h.

void KIO::FileCopyJob::mimetype | ( | KIO::Job * | job,
|  | const QString & | type
| ) |  |

signal

Mimetype determined during a file copy.

This is never emitted during a move, and might not be emitted during a copy, depending on the slave.

Parameters

  job | the job that emitted this signal
  type | the mime type

Since
  3.5.7

void FileCopyJob::setModificationTime | ( | time_t | mtime | ) |

Sets the modification time of the file.

Note that this is ignored if a direct copy (SlaveBase::copy) can be done, in which case the mtime of the source is applied to the destination (if the protocol supports the concept).

Definition at line 1653 of file job.cpp.

void FileCopyJob::setSourceSize | ( | off_t | size | ) |

Deprecated:

Definition at line 1639 of file job.cpp.

void FileCopyJob::setSourceSize64 | ( | KIO::filesize_t | size | ) |

If you know the size of the source file, call this method to inform this job.

It will be displayed in the "resume" dialog.

Parameters

  size | the size of the source file

Since
  3.2

Definition at line 1646 of file job.cpp.

void FileCopyJob::slotCanResume | ( | KIO::Job * | job,
|  | KIO::filesize_t | offset
| ) |  |

protected slot

Forward signal from subjob.

Parameters

  job | the job that emitted this signal
  offset | the offset to resume from

Definition at line 1746 of file job.cpp.

void FileCopyJob::slotPercent | ( | KIO::Job * | job,
|  | unsigned long | pct
| ) |  |

protected slot

Forward signal from subjob.

Parameters

  job | the job that emitted this signal
  pct | the percentage

Definition at line 1714 of file job.cpp.

void FileCopyJob::slotProcessedSize | ( | KIO::Job * | job,
|  | KIO::filesize_t | size
| ) |  |

protected slot

Forward signal from subjob.

Parameters

  job | the job that emitted this signal
  size | the processed size in bytes

Definition at line 1695 of file job.cpp.

void FileCopyJob::slotResult | ( | KIO::Job * | job | ) |

protected virtual slot

Called whenever a subjob finishes.

Parameters

  job | the job that emitted this signal

Definition at line 1880 of file job.cpp.

void FileCopyJob::slotTotalSize | ( | KIO::Job * | job,
|  | KIO::filesize_t | size
| ) |  |

protected slot

Forward signal from subjob.

Parameters

  job | the job that emitted this signal
  size | the total size

Definition at line 1705 of file job.cpp.

KURL KIO::FileCopyJob::srcURL | ( |  | ) | const

inline

Returns the source URL.

Returns
  the source URL

Definition at line 1295 of file jobclasses.h.

The documentation for this class was generated from the following files:

- jobclasses.h
- job.cpp

KDE Home | KDE Accessibility Home | Description of Access Keys