• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kio

KIO::StatJob

KIO::StatJob Class Reference

A KIO job that retrieves information about a file or directory. More...

#include <jobclasses.h>

Inheritance diagram for KIO::StatJob:

Inheritance graph
[legend]

List of all members.


Signals

void permanentRedirection (KIO::Job *job, const KURL &fromUrl, const KURL &toUrl)
void redirection (KIO::Job *job, const KURL &url)

Public Member Functions

void setDetails (short int details)
void setSide (bool source)
virtual void start (Slave *slave)
 StatJob (const KURL &url, int command, const QByteArray &packedArgs, bool showProgressInfo)
const UDSEntry & statResult () const

Protected Slots

virtual void slotFinished ()
virtual void slotMetaData (const KIO::MetaData &_metaData)
void slotRedirection (const KURL &url)
void slotStatEntry (const KIO::UDSEntry &entry)

Protected Member Functions

virtual void virtual_hook (int id, void *data)

Protected Attributes

bool m_bSource
short int m_details
KURL m_redirectionURL
UDSEntry m_statResult

Detailed Description

A KIO job that retrieves information about a file or directory.

See also:
KIO::stat()

Definition at line 688 of file jobclasses.h.


Constructor & Destructor Documentation

StatJob::StatJob ( const KURL &  url,
int  command,
const QByteArray &  packedArgs,
bool  showProgressInfo 
)

Do not use this constructor to create a StatJob, use KIO::stat() instead.

Parameters:
url the url of the file or directory to check
command the command to issue
packedArgs the arguments
showProgressInfo true to show progress information to the user

Definition at line 815 of file job.cpp.


Member Function Documentation

void KIO::StatJob::permanentRedirection ( KIO::Job *  job,
const KURL &  fromUrl,
const KURL &  toUrl 
) [signal]

Signals a permanent redirection.

The redirection itself is handled internally.

Parameters:
job the job that is redirected
fromUrl the original URL
toUrl the new URL
Since:
3.1

void KIO::StatJob::redirection ( KIO::Job *  job,
const KURL &  url 
) [signal]

Signals a redirection.

Use to update the URL shown to the user. The redirection itself is handled internally.

Parameters:
job the job that is redirected
url the new url

void KIO::StatJob::setDetails ( short int  details  )  [inline]

Selects the level of details we want.

By default this is 2 (all details wanted, including modification time, size, etc.), setDetails(1) is used when deleting: we don't need all the information if it takes too much time, no need to follow symlinks etc. setDetails(0) is used for very simple probing: we'll only get the answer "it's a file or a directory, or it doesn't exist". This is used by KRun.

Parameters:
details 2 for all details, 1 for simple, 0 for very simple

Definition at line 720 of file jobclasses.h.

void KIO::StatJob::setSide ( bool  source  )  [inline]

A stat() can have two meanings.

Either we want to read from this URL, or to check if we can write to it. First case is "source", second is "dest". It is necessary to know what the StatJob is for, to tune the kioslave's behavior (e.g. with FTP).

Parameters:
source true for "source" mode, false for "dest" mode

Definition at line 709 of file jobclasses.h.

void StatJob::slotFinished (  )  [protected, virtual, slot]

Called when the slave marks the job as finished.

Reimplemented from KIO::SimpleJob.

Definition at line 859 of file job.cpp.

void StatJob::slotMetaData ( const KIO::MetaData &  _metaData  )  [protected, virtual, slot]

MetaData from the slave is received.

Parameters:
_metaData the meta data
See also:
metaData()

Reimplemented from KIO::SimpleJob.

Definition at line 881 of file job.cpp.

void StatJob::slotRedirection ( const KURL &  url  )  [protected, slot]

Definition at line 842 of file job.cpp.

void StatJob::slotStatEntry ( const KIO::UDSEntry &  entry  )  [protected, slot]

Definition at line 835 of file job.cpp.

void StatJob::start ( Slave *  slave  )  [virtual]

For internal use only.

Called by the scheduler when a slave gets to work on this job.

Parameters:
slave the slave that starts working on this job

Reimplemented from KIO::SimpleJob.

Definition at line 822 of file job.cpp.

const UDSEntry& KIO::StatJob::statResult (  )  const [inline]

Call this in the slot connected to result, and only after making sure no error happened.

Returns:
the result of the stat

Definition at line 727 of file jobclasses.h.

void StatJob::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

Reimplemented from KIO::SimpleJob.

Definition at line 4752 of file job.cpp.


Member Data Documentation

bool KIO::StatJob::m_bSource [protected]

Definition at line 766 of file jobclasses.h.

short int KIO::StatJob::m_details [protected]

Definition at line 767 of file jobclasses.h.

KURL KIO::StatJob::m_redirectionURL [protected]

Definition at line 765 of file jobclasses.h.

UDSEntry KIO::StatJob::m_statResult [protected]

Definition at line 764 of file jobclasses.h.


The documentation for this class was generated from the following files:
  • jobclasses.h
  • job.cpp

kio

Skip menu "kio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal