• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

KIO

  • KIO
  • StatJob
Public Types | Signals | Public Member Functions | Protected Slots | Protected Member Functions

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.

Public Types

enum  StatSide { SourceSide, DestinationSide }

Signals

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

Public Member Functions

 ~StatJob ()
KUrl mostLocalUrl () const
void setDetails (short int details)
void setSide (StatSide side)
void setSide (bool source)
const UDSEntry & statResult () const

Protected Slots

virtual void slotFinished ()
virtual void slotMetaData (const KIO::MetaData &_metaData)

Protected Member Functions

 StatJob (StatJobPrivate &dd)

Detailed Description

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

See also:
KIO::stat()

Definition at line 441 of file jobclasses.h.


Member Enumeration Documentation

enum KIO::StatJob::StatSide
Enumerator:
SourceSide 
DestinationSide 

Definition at line 446 of file jobclasses.h.


Constructor & Destructor Documentation

StatJob::~StatJob ( )

Definition at line 826 of file job.cpp.

StatJob::StatJob ( StatJobPrivate &  dd) [protected]

Definition at line 821 of file job.cpp.


Member Function Documentation

KUrl StatJob::mostLocalUrl ( ) const

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

Returns:
the most local URL for the URL we were stat'ing.

Sample usage: KIO::StatJob* job = KIO::mostLocalUrl("desktop:/foo"); job->ui()->setWindow(this); connect(job, SIGNAL(result(KJob*)), this, SLOT(slotMostLocalUrlResult(KJob*))); [...] // and in the slot if (job->error()) { [...] // doesn't exist } else { const KUrl localUrl = job->mostLocalUrl(); // localUrl = file:///$HOME/Desktop/foo [...] }

Since:
4.4

Definition at line 852 of file job.cpp.

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:
jobthe job that is redirected
fromUrlthe original URL
toUrlthe new URL
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:
jobthe job that is redirected
urlthe new url
void StatJob::setDetails ( short int  details)

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:
details2 for all details, 1 for simple, 0 for very simple

Definition at line 842 of file job.cpp.

void StatJob::setSide ( bool  source)

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:
sourcetrue for "source" mode, false for "dest" mode

Definition at line 831 of file job.cpp.

void StatJob::setSide ( StatSide  side)

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:
sideSourceSide or DestinationSide

Definition at line 837 of file job.cpp.

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

Called when the slave marks the job as finished.

Reimplemented from KIO::SimpleJob.

Definition at line 902 of file job.cpp.

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

MetaData from the slave is received.

Parameters:
_metaDatathe meta data
See also:
metaData()

Reimplemented from KIO::SimpleJob.

Definition at line 927 of file job.cpp.

const UDSEntry & StatJob::statResult ( ) const

Result of the stat operation.

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 847 of file job.cpp.


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

KIO

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
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