• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdeio
 

tdeio/tdeio

Classes | Typedefs | Enumerations | Functions | Variables

TDEIO Namespace Reference

A namespace for TDEIO globals. More...

Classes

class  AuthInfo
 This class is intended to make it easier to prompt for, cache and retrieve authorization information. More...
class  NetRC
 A Singleton class that provides access to passwords stored in .netrc files for automatic login purposes. More...
class  ChmodJob
 This job changes permissions on a list of files or directories, optionally in a recursive manner. More...
class  Connection
 This class provides a simple means for IPC between two applications via a pipe. More...
class  DataProtocol
 This tdeioslave provides support of data urls as specified by rfc 2397. More...
class  DataSlave
 This class provides a high performance implementation for the data url scheme (rfc2397). More...
class  DavJob
 The transfer job pumps data into and/or out of a Slave. More...
class  ForwardingSlaveBase
 This class should be used as a base for ioslaves acting as a forwarder to other ioslaves. More...
class  MetaData
 MetaData is a simple map of key/value strings. More...
class  Job
 The base class for all jobs. More...
class  SimpleJob
 A simple job (one url and one command). More...
class  StatJob
 A TDEIO job that retrieves information about a file or directory. More...
class  MkdirJob
 A TDEIO job that creates a directory. More...
class  TransferJob
 The transfer job pumps data into and/or out of a Slave. More...
class  StoredTransferJob
 StoredTransferJob is a TransferJob (for downloading or uploading data) that also stores a TQByteArray with the data, making it simpler to use than the standard TransferJob. More...
class  MultiGetJob
 The MultiGetJob is a TransferJob that allows you to get several files from a single server. More...
class  MimetypeJob
 A MimetypeJob is a TransferJob that allows you to get the mime type of an URL. More...
class  FileCopyJob
 The FileCopyJob copies data from one place to another. More...
class  ListJob
 A ListJob is allows you to get the get the content of a directory. More...
class  CopyJob
 CopyJob is used to move, copy or symlink files and directories. More...
class  DeleteJob
 A more complex Job to delete files and directories. More...
class  LocalURLJob
 A TDEIO job that finds a local URL. More...
class  MetaInfoJob
 MetaInfoJob is a TDEIO Job to retrieve meta information from files. More...
class  NetAccess
 Net Transparency. More...
class  PasswordDialog
 A dialog for requesting a login and a password from the end user. More...
class  PreviewJob
 TDEIO Job to get a thumbnail picture. More...
class  ProgressBase
 This class does all initialization stuff for progress, like connecting signals to slots. More...
class  RenameDlg
 A dialog for the options to rename two files. More...
class  Scheduler
 The TDEIO::Scheduler manages io-slaves for the application. More...
class  Slave
 Attention developers: If you change the implementation of TDEIO::Slave, do *not* use connection() or slaveconn but the respective TDEIO::Slave accessor methods. More...
class  SlaveBase
 There are two classes that specifies the protocol between application (job) and tdeioslave. More...
class  SlaveConfig
 SlaveConfig. More...
class  SlaveInterface
 There are two classes that specifies the protocol between application (TDEIO::Job) and tdeioslave. More...
class  StatusbarProgress
 This is a special IO progress widget. More...
class  TCPSlaveBase
 There are two classes that specifies the protocol between application (job) and tdeioslave. More...

Typedefs

typedef TQ_LLONG fileoffset_t
typedef TQ_ULLONG filesize_t
typedef TQValueList< UDSAtom > UDSEntry
typedef TQValueList< UDSEntry > UDSEntryList
typedef TQValueListIterator
< UDSEntry > 
UDSEntryListIterator
typedef
TQValueListConstIterator
< UDSEntry > 
UDSEntryListConstIterator

Enumerations

enum  Command {
  CMD_HOST = '0', CMD_CONNECT = '1', CMD_DISCONNECT = '2', CMD_SLAVE_STATUS = '3',
  CMD_SLAVE_CONNECT = '4', CMD_SLAVE_HOLD = '5', CMD_NONE = 'A', CMD_TESTDIR = 'B',
  CMD_GET = 'C', CMD_PUT = 'D', CMD_STAT = 'E', CMD_MIMETYPE = 'F',
  CMD_LISTDIR = 'G', CMD_MKDIR = 'H', CMD_RENAME = 'I', CMD_COPY = 'J',
  CMD_DEL = 'K', CMD_CHMOD = 'L', CMD_SPECIAL = 'M', CMD_USERPASS = 'N',
  CMD_REPARSECONFIGURATION = 'O', CMD_META_DATA = 'P', CMD_SYMLINK = 'Q', CMD_SUBURL = 'R',
  CMD_MESSAGEBOXANSWER = 'S', CMD_RESUMEANSWER = 'T', CMD_CONFIG = 'U', CMD_MULTI_GET = 'V',
  CMD_LOCALURL = 'W'
}
enum  Error {
  ERR_CANNOT_OPEN_FOR_READING = 1, ERR_CANNOT_OPEN_FOR_WRITING = 2, ERR_CANNOT_LAUNCH_PROCESS = 3, ERR_INTERNAL = 4,
  ERR_MALFORMED_URL = 5, ERR_UNSUPPORTED_PROTOCOL = 6, ERR_NO_SOURCE_PROTOCOL = 7, ERR_UNSUPPORTED_ACTION = 8,
  ERR_IS_DIRECTORY = 9, ERR_IS_FILE = 10, ERR_DOES_NOT_EXIST = 11, ERR_FILE_ALREADY_EXIST = 12,
  ERR_DIR_ALREADY_EXIST = 13, ERR_UNKNOWN_HOST = 14, ERR_ACCESS_DENIED = 15, ERR_WRITE_ACCESS_DENIED = 16,
  ERR_CANNOT_ENTER_DIRECTORY = 17, ERR_PROTOCOL_IS_NOT_A_FILESYSTEM = 18, ERR_CYCLIC_LINK = 19, ERR_USER_CANCELED = 20,
  ERR_CYCLIC_COPY = 21, ERR_COULD_NOT_CREATE_SOCKET = 22, ERR_COULD_NOT_CONNECT = 23, ERR_CONNECTION_BROKEN = 24,
  ERR_NOT_FILTER_PROTOCOL = 25, ERR_COULD_NOT_MOUNT = 26, ERR_COULD_NOT_UNMOUNT = 27, ERR_COULD_NOT_READ = 28,
  ERR_COULD_NOT_WRITE = 29, ERR_COULD_NOT_BIND = 30, ERR_COULD_NOT_LISTEN = 31, ERR_COULD_NOT_ACCEPT = 32,
  ERR_COULD_NOT_LOGIN = 33, ERR_COULD_NOT_STAT = 34, ERR_COULD_NOT_CLOSEDIR = 35, ERR_COULD_NOT_MKDIR = 37,
  ERR_COULD_NOT_RMDIR = 38, ERR_CANNOT_RESUME = 39, ERR_CANNOT_RENAME = 40, ERR_CANNOT_CHMOD = 41,
  ERR_CANNOT_DELETE = 42, ERR_SLAVE_DIED = 43, ERR_OUT_OF_MEMORY = 44, ERR_UNKNOWN_PROXY_HOST = 45,
  ERR_COULD_NOT_AUTHENTICATE = 46, ERR_ABORTED = 47, ERR_INTERNAL_SERVER = 48, ERR_SERVER_TIMEOUT = 49,
  ERR_SERVICE_NOT_AVAILABLE = 50, ERR_UNKNOWN = 51, ERR_UNKNOWN_INTERRUPT = 53, ERR_CANNOT_DELETE_ORIGINAL = 54,
  ERR_CANNOT_DELETE_PARTIAL = 55, ERR_CANNOT_RENAME_ORIGINAL = 56, ERR_CANNOT_RENAME_PARTIAL = 57, ERR_NEED_PASSWD = 58,
  ERR_CANNOT_SYMLINK = 59, ERR_NO_CONTENT = 60, ERR_DISK_FULL = 61, ERR_IDENTICAL_FILES = 62,
  ERR_SLAVE_DEFINED = 63, ERR_UPGRADE_REQUIRED = 64, ERR_POST_DENIED = 65, ERR_OFFLINE_MODE = 66
}
enum  UDSAtomTypes {
  UDS_STRING = 1, UDS_LONG = 2, UDS_TIME = 4 | UDS_LONG, UDS_SIZE = 8 | UDS_LONG,
  UDS_SIZE_LARGE = 32768 | UDS_LONG, UDS_USER = 16 | UDS_STRING, UDS_ICON_NAME = 24 | UDS_STRING, UDS_GROUP = 32 | UDS_STRING,
  UDS_EXTRA = 48 | UDS_STRING, UDS_NAME = 64 | UDS_STRING, UDS_LOCAL_PATH = 72 | UDS_STRING, UDS_HIDDEN = 80 | UDS_LONG,
  UDS_EXTENDED_ACL = 88 | UDS_LONG, UDS_ACL_STRING = 96 | UDS_STRING, UDS_DEFAULT_ACL_STRING = 104 | UDS_STRING, UDS_ACCESS = 128 | UDS_LONG,
  UDS_MODIFICATION_TIME = 256 | UDS_TIME, UDS_ACCESS_TIME = 512 | UDS_TIME, UDS_CREATION_TIME = 1024 | UDS_TIME, UDS_FILE_TYPE = 2048 | UDS_LONG,
  UDS_LINK_DEST = 4096 | UDS_STRING, UDS_URL = 8192 | UDS_STRING, UDS_MIME_TYPE = 16384 | UDS_STRING, UDS_GUESSED_MIME_TYPE = 16392 | UDS_STRING,
  UDS_XML_PROPERTIES = 0x8000 | UDS_STRING
}
enum  CacheControl {
  CC_CacheOnly, CC_Cache, CC_Verify, CC_Refresh,
  CC_Reload
}
enum  FileSystemFlag {
  SupportsChmod, SupportsChown, SupportsUTime, SupportsSymlinks,
  CaseInsensitive
}
enum  Progress { DEFAULT = 1, STATUSBAR = 2, LIST = 3 }
enum  RenameDlg_Mode {
  M_OVERWRITE = 1, M_OVERWRITE_ITSELF = 2, M_SKIP = 4, M_SINGLE = 8,
  M_MULTI = 16, M_RESUME = 32, M_NORENAME = 64
}
enum  RenameDlg_Result {
  R_RESUME = 6, R_RESUME_ALL = 7, R_OVERWRITE = 4, R_OVERWRITE_ALL = 5,
  R_SKIP = 2, R_AUTO_SKIP = 3, R_RENAME = 1, R_CANCEL = 0
}
enum  SkipDlg_Result { S_SKIP = 1, S_AUTO_SKIP = 2, S_CANCEL = 0 }
enum  Info {
  INF_TOTAL_SIZE = 10, INF_PROCESSED_SIZE = 11, INF_SPEED, INF_REDIRECTION = 20,
  INF_MIME_TYPE = 21, INF_ERROR_PAGE = 22, INF_WARNING = 23, INF_GETTING_FILE,
  INF_NEED_PASSWD = 25, INF_INFOMESSAGE, INF_META_DATA, INF_NETWORK_STATUS,
  INF_MESSAGEBOX, INF_LOCALURL
}
enum  Message {
  MSG_DATA = 100, MSG_DATA_REQ, MSG_ERROR, MSG_CONNECTED,
  MSG_FINISHED, MSG_STAT_ENTRY, MSG_LIST_ENTRIES, MSG_RENAMED,
  MSG_RESUME, MSG_SLAVE_STATUS, MSG_SLAVE_ACK, MSG_NET_REQUEST,
  MSG_NET_DROP, MSG_NEED_SUBURL_DATA, MSG_CANRESUME, MSG_AUTH_KEY,
  MSG_DEL_AUTH_KEY
}

Functions

TDEIO_EXPORT TQDataStream & operator<< (TQDataStream &s, const AuthInfo &a)
TDEIO_EXPORT TQDataStream & operator>> (TQDataStream &s, AuthInfo &a)
TDEIO_EXPORT ChmodJob * chmod (const KFileItemList &lstItems, int permissions, int mask, TQString newOwner, TQString newGroup, bool recursive, bool showProgressInfo=true)
TDEIO_EXPORT DavJob * davPropFind (const KURL &url, const TQDomDocument &properties, TQString depth, bool showProgressInfo=true)
TDEIO_EXPORT DavJob * davPropPatch (const KURL &url, const TQDomDocument &properties, bool showProgressInfo=true)
TDEIO_EXPORT DavJob * davSearch (const KURL &url, const TQString &nsURI, const TQString &qName, const TQString &query, bool showProgressInfo=true)
TDEIO_EXPORT TQString convertSize (TDEIO::filesize_t size)
TDEIO_EXPORT TQString convertSizeWithBytes (TDEIO::filesize_t size)
TDEIO_EXPORT TQString number (TDEIO::filesize_t size)
TDEIO_EXPORT TQString convertSizeFromKB (TDEIO::filesize_t kbSize)
TDEIO_EXPORT unsigned int calculateRemainingSeconds (TDEIO::filesize_t totalSize, TDEIO::filesize_t processedSize, TDEIO::filesize_t speed)
TDEIO_EXPORT TQString convertSeconds (unsigned int seconds)
TDEIO_EXPORT TQTime calculateRemaining (TDEIO::filesize_t totalSize, TDEIO::filesize_t processedSize, TDEIO::filesize_t speed) KDE_DEPRECATED
TDEIO_EXPORT TQString itemsSummaryString (uint items, uint files, uint dirs, TDEIO::filesize_t size, bool showSize)
TDEIO_EXPORT TQString encodeFileName (const TQString &str)
TDEIO_EXPORT TQString decodeFileName (const TQString &str)
TDEIO_EXPORT TQString buildErrorString (int errorCode, const TQString &errorText)
TDEIO_EXPORT TQString buildHTMLErrorString (int errorCode, const TQString &errorText, const KURL *reqUrl=0L, int method=-1)
TDEIO_EXPORT TQByteArray rawErrorDetail (int errorCode, const TQString &errorText, const KURL *reqUrl=0L, int method=-1)
TDEIO_EXPORT TQString unsupportedActionErrorString (const TQString &protocol, int cmd)
TDEIO_EXPORT TDEIO::CacheControl parseCacheControl (const TQString &cacheControl)
TDEIO_EXPORT TQString getCacheControlString (TDEIO::CacheControl cacheControl)
TDEIO_EXPORT TQString findDeviceMountPoint (const TQString &device)
TDEIO_EXPORT TQString findPathMountPoint (const TQString &filename)
TDEIO_EXPORT bool probably_slow_mounted (const TQString &filename)
TDEIO_EXPORT bool manually_mounted (const TQString &filename)
TDEIO_EXPORT bool testFileSystemFlag (const TQString &filename, FileSystemFlag flag)
TDEIO_EXPORT SimpleJob * mkdir (const KURL &url, int permissions=-1)
TDEIO_EXPORT SimpleJob * rmdir (const KURL &url)
TDEIO_EXPORT SimpleJob * chmod (const KURL &url, int permissions)
TDEIO_EXPORT SimpleJob * rename (const KURL &src, const KURL &dest, bool overwrite)
TDEIO_EXPORT SimpleJob * symlink (const TQString &target, const KURL &dest, bool overwrite, bool showProgressInfo=true)
TDEIO_EXPORT SimpleJob * special (const KURL &url, const TQByteArray &data, bool showProgressInfo=true)
TDEIO_EXPORT SimpleJob * mount (bool ro, const char *fstype, const TQString &dev, const TQString &point, bool showProgressInfo=true)
TDEIO_EXPORT SimpleJob * unmount (const TQString &point, bool showProgressInfo=true)
TDEIO_EXPORT LocalURLJob * localURL (const KURL &remoteUrl)
TDEIO_EXPORT SimpleJob * http_update_cache (const KURL &url, bool no_cache, time_t expireDate)
TDEIO_EXPORT StatJob * stat (const KURL &url, bool showProgressInfo=true)
TDEIO_EXPORT StatJob * stat (const KURL &url, bool sideIsSource, short int details, bool showProgressInfo=true)
TDEIO_EXPORT TransferJob * get (const KURL &url, bool reload=false, bool showProgressInfo=true)
TDEIO_EXPORT TransferJob * put (const KURL &url, int permissions, bool overwrite, bool resume, bool showProgressInfo=true)
TDEIO_EXPORT TransferJob * http_post (const KURL &url, const TQByteArray &postData, bool showProgressInfo=true)
TDEIO_EXPORT StoredTransferJob * storedGet (const KURL &url, bool reload=false, bool showProgressInfo=true)
TDEIO_EXPORT StoredTransferJob * storedPut (const TQByteArray &arr, const KURL &url, int permissions, bool overwrite, bool resume, bool showProgressInfo=true)
TDEIO_EXPORT MultiGetJob * multi_get (long id, const KURL &url, const MetaData &metaData)
TDEIO_EXPORT MimetypeJob * mimetype (const KURL &url, bool showProgressInfo=true)
TDEIO_EXPORT FileCopyJob * file_copy (const KURL &src, const KURL &dest, int permissions=-1, bool overwrite=false, bool resume=false, bool showProgressInfo=true)
TDEIO_EXPORT FileCopyJob * file_move (const KURL &src, const KURL &dest, int permissions=-1, bool overwrite=false, bool resume=false, bool showProgressInfo=true)
TDEIO_EXPORT SimpleJob * file_delete (const KURL &src, bool showProgressInfo=true)
TDEIO_EXPORT ListJob * listDir (const KURL &url, bool showProgressInfo=true, bool includeHidden=true)
TDEIO_EXPORT ListJob * listRecursive (const KURL &url, bool showProgressInfo=true, bool includeHidden=true)
TDEIO_EXPORT CopyJob * copy (const KURL &src, const KURL &dest, bool showProgressInfo=true)
TDEIO_EXPORT CopyJob * copyAs (const KURL &src, const KURL &dest, bool showProgressInfo=true)
TDEIO_EXPORT CopyJob * copy (const KURL::List &src, const KURL &dest, bool showProgressInfo=true)
TDEIO_EXPORT CopyJob * move (const KURL &src, const KURL &dest, bool showProgressInfo=true)
TDEIO_EXPORT CopyJob * moveAs (const KURL &src, const KURL &dest, bool showProgressInfo=true)
TDEIO_EXPORT CopyJob * move (const KURL::List &src, const KURL &dest, bool showProgressInfo=true)
TDEIO_EXPORT CopyJob * link (const KURL &src, const KURL &destDir, bool showProgressInfo=true)
TDEIO_EXPORT CopyJob * link (const KURL::List &src, const KURL &destDir, bool showProgressInfo=true)
TDEIO_EXPORT CopyJob * linkAs (const KURL &src, const KURL &dest, bool showProgressInfo=true)
TDEIO_EXPORT CopyJob * trash (const KURL &src, bool showProgressInfo=true)
TDEIO_EXPORT CopyJob * trash (const KURL::List &src, bool showProgressInfo=true)
TDEIO_EXPORT DeleteJob * del (const KURL &src, bool shred=false, bool showProgressInfo=true)
TDEIO_EXPORT DeleteJob * del (const KURL::List &src, bool shred=false, bool showProgressInfo=true)
int matchConstraint (const ParseTreeBase *_tree, const KService::Ptr &, const KServiceTypeProfile::OfferList &)
PreferencesReturn matchPreferences (const ParseTreeBase *_tree, const KService::Ptr &, const KServiceTypeProfile::OfferList &)
TDEIO_EXPORT ParseTreeBase::Ptr parseConstraints (const TQString &_constr)
TDEIO_EXPORT ParseTreeBase::Ptr parsePreferences (const TQString &_prefs)
TDEIO_EXPORT MetaInfoJob * fileMetaInfo (const KFileItemList &items)
TDEIO_EXPORT MetaInfoJob * fileMetaInfo (const KURL::List &items)
TDEIO_EXPORT Job * pasteClipboard (const KURL &destURL, bool move=false)
TDEIO_EXPORT void pasteData (const KURL &destURL, const TQByteArray &data)
TDEIO_EXPORT CopyJob * pasteDataAsync (const KURL &destURL, const TQByteArray &data)
TDEIO_EXPORT CopyJob * pasteDataAsync (const KURL &destURL, const TQByteArray &data, const TQString &dialogText)
TDEIO_EXPORT CopyJob * pasteMimeSource (TQMimeSource *data, const KURL &destURL, const TQString &dialogText, TQWidget *widget, bool clipboard=false)
TDEIO_EXPORT_DEPRECATED bool isClipboardEmpty ()
TDEIO_EXPORT TQString pasteActionText ()
TDEIO_EXPORT PreviewJob * filePreview (const KFileItemList &items, int width, int height=0, int iconSize=0, int iconAlpha=70, bool scale=true, bool save=true, const TQStringList *enabledPlugins=0)
TDEIO_EXPORT PreviewJob * filePreview (const KURL::List &items, int width, int height=0, int iconSize=0, int iconAlpha=70, bool scale=true, bool save=true, const TQStringList *enabledPlugins=0)
TDEIO_EXPORT RenameDlg_Result open_RenameDlg (const TQString &caption, const TQString &src, const TQString &dest, RenameDlg_Mode mode, TQString &newDestPath, TDEIO::filesize_t sizeSrc=(TDEIO::filesize_t)-1, TDEIO::filesize_t sizeDest=(TDEIO::filesize_t)-1, time_t ctimeSrc=(time_t)-1, time_t ctimeDest=(time_t)-1, time_t mtimeSrc=(time_t)-1, time_t mtimeDest=(time_t)-1)
TDEIO_EXPORT SkipDlg_Result open_SkipDlg (bool _multi, const TQString &_error_text=TQString::null)
static void readConfig (TDEConfig *config, const TQString &group, MetaData *metaData)

Variables

static KStaticDeleter
< SlaveConfig > 
slaveconfigsd

Detailed Description

A namespace for TDEIO globals.


Typedef Documentation

typedef TQ_LLONG TDEIO::fileoffset_t

64-bit file offset

Definition at line 37 of file global.h.

typedef TQ_ULLONG TDEIO::filesize_t

64-bit file size

Definition at line 39 of file global.h.

typedef TQValueList<UDSAtom> TDEIO::UDSEntry

An entry is the list of atoms containing all the information for a file or URL.

Definition at line 507 of file global.h.


Enumeration Type Documentation

enum TDEIO::CacheControl

Specifies how to use the cache.

See also:
parseCacheControl()
getCacheControlString()
Enumerator:
CC_CacheOnly 

Fail request if not in cache.

CC_Cache 

Use cached entry if available.

CC_Verify 

Validate cached entry with remote site if expired.

CC_Refresh 

Always validate cached entry with remote site.

Since:
3.1
CC_Reload 

Always fetch from remote site.

Definition at line 387 of file global.h.

enum TDEIO::Command

Commands that can be invoked by a job.

Definition at line 138 of file global.h.

enum TDEIO::Error

Error codes that can be emitted by TDEIO.

Definition at line 175 of file global.h.

enum TDEIO::Info

Identifiers for TDEIO informational messages.

Definition at line 44 of file slaveinterface.h.

enum TDEIO::Message

Identifiers for TDEIO data messages.

Definition at line 65 of file slaveinterface.h.

enum TDEIO::RenameDlg_Result

The result of open_RenameDlg().

Definition at line 40 of file renamedlg.h.

enum TDEIO::UDSAtomTypes

Constants used to specify the type of a KUDSAtom.

Enumerator:
UDS_STRING 

First let's define the item types.

UDS_SIZE 

Size of the file.

UDS_USER 

User ID of the file owner.

UDS_ICON_NAME 

Name of the icon, that should be used for displaying.

It overrides all other detection mechanisms

Since:
3.2
UDS_GROUP 

Group ID of the file owner.

UDS_EXTRA 

Extra data (used only if you specified Columns/ColumnsTypes) This is the only UDS entry that can be repeated.

Since:
3.2
UDS_NAME 

Filename - as displayed in directory listings etc.

"." has the usual special meaning of "current directory"

UDS_LOCAL_PATH 

A local file path if the ioslave display files sitting on the local filesystem (but in another hierarchy, e.g.

media:/)

UDS_HIDDEN 

Treat the file as a hidden file or as a normal file, regardless of (the absence of) a leading dot in the filename.

UDS_EXTENDED_ACL 

Indicates that the entry has extended ACL entries.

Since:
3.5
UDS_ACL_STRING 

The access control list serialized into a single string.

Since:
3.5
UDS_DEFAULT_ACL_STRING 

The default access control list serialized into a single string.

Only available for directories.

Since:
3.5
UDS_ACCESS 

Access permissions (part of the mode returned by stat).

UDS_MODIFICATION_TIME 

The last time the file was modified.

UDS_ACCESS_TIME 

The last time the file was opened.

UDS_CREATION_TIME 

The time the file was created.

UDS_FILE_TYPE 

File type, part of the mode returned by stat (for a link, this returns the file type of the pointed item) check UDS_LINK_DEST to know if this is a link.

UDS_LINK_DEST 

Name of the file where the link points to Allows to check for a symlink (don't use S_ISLNK !).

UDS_URL 

An alternative URL (If different from the caption).

UDS_MIME_TYPE 

A mime type; prevents guessing.

UDS_GUESSED_MIME_TYPE 

A mime type to be used for displaying only.

But when 'running' the file, the mimetype is re-determined

UDS_XML_PROPERTIES 

XML properties, e.g.

for WebDAV

Since:
3.1

Definition at line 308 of file global.h.


Function Documentation

TDEIO_EXPORT TQString TDEIO::buildErrorString ( int  errorCode,
const TQString &  errorText 
)

Returns a translated error message for errorCode using the additional error information provided by errorText.

Parameters:
errorCode the error code
errorText the additional error text
Returns:
the created error string

Definition at line 230 of file global.cpp.

TDEIO_EXPORT TQString TDEIO::buildHTMLErrorString ( int  errorCode,
const TQString &  errorText,
const KURL *  reqUrl = 0L,
int  method = -1 
)

Returns a translated html error message for errorCode using the additional error information provided by errorText , reqUrl (the request URL), and the ioslave method .

Parameters:
errorCode the error code
errorText the additional error text
reqUrl the request URL
method the ioslave method
Returns:
the created error string
TDEIO_EXPORT TQTime TDEIO::calculateRemaining ( TDEIO::filesize_t  totalSize,
TDEIO::filesize_t  processedSize,
TDEIO::filesize_t  speed 
)

Calculates remaining time from total size, processed size and speed.

Warning: As TQTime is limited to 23:59:59, use calculateRemainingSeconds() instead

Parameters:
totalSize total size in bytes
processedSize processed size in bytes
speed speed in bytes per second
Returns:
calculated remaining time

Definition at line 127 of file global.cpp.

TDEIO_EXPORT unsigned int TDEIO::calculateRemainingSeconds ( TDEIO::filesize_t  totalSize,
TDEIO::filesize_t  processedSize,
TDEIO::filesize_t  speed 
)

Calculates remaining time in seconds from total size, processed size and speed.

Parameters:
totalSize total size in bytes
processedSize processed size in bytes
speed speed in bytes per second
Returns:
calculated remaining time in seconds
Since:
3.4

Definition at line 103 of file global.cpp.

TDEIO_EXPORT ChmodJob * TDEIO::chmod ( const KFileItemList &  lstItems,
int  permissions,
int  mask,
TQString  newOwner,
TQString  newGroup,
bool  recursive,
bool  showProgressInfo = true 
)

Creates a job that changes permissions/ownership on several files or directories, optionally recursively.

This version of chmod uses a KFileItemList so that it directly knows what to do with the items. TODO: a version that takes a KURL::List, and a general job that stats each url and returns a KFileItemList.

Note that change of ownership is only supported for local files.

Inside directories, the "x" bits will only be changed for files that had at least one "x" bit before, and for directories. This emulates the behavior of chmod +X.

Parameters:
lstItems The file items representing several files or directories.
permissions the permissions we want to set
mask the bits we are allowed to change. For instance, if mask is 0077, we don't change the "user" bits, only "group" and "others".
newOwner If non-empty, the new owner for the files
newGroup If non-empty, the new group for the files
recursive whether to open directories recursively
showProgressInfo true to show progess information
Returns:
The job handling the operation.

Definition at line 230 of file chmodjob.cpp.

SimpleJob * TDEIO::chmod ( const KURL &  url,
int  permissions 
)

Changes permissions on a file or directory.

See the other chmod below for changing many files or directories.

Parameters:
url The URL of file or directory.
permissions The permissions to set.
Returns:
the job handling the operation.

Definition at line 765 of file job.cpp.

TDEIO_EXPORT TQString TDEIO::convertSeconds ( unsigned int  seconds  ) 

Convert seconds to a string representing number of days, hours, minutes and seconds.

Parameters:
seconds number of seconds to convert
Returns:
string representation in a locale depending format
Since:
3.4

Definition at line 112 of file global.cpp.

TDEIO_EXPORT TQString TDEIO::convertSize ( TDEIO::filesize_t  size  ) 

Converts size from bytes to the string representation.

Parameters:
size size in bytes
Returns:
converted size as a string - e.g. 123.4 kB , 12.0 MB

Definition at line 53 of file global.cpp.

TDEIO_EXPORT TQString TDEIO::convertSizeFromKB ( TDEIO::filesize_t  kbSize  ) 

Converts size from kilo-bytes to the string representation.

Parameters:
kbSize size in kilo-bytes
Returns:
converted size as a string - e.g. 123.4 kB , 12.0 MB

Definition at line 91 of file global.cpp.

TDEIO_EXPORT TQString TDEIO::convertSizeWithBytes ( TDEIO::filesize_t  size  ) 

Converts size from bytes to a string representation with includes the size in bytes.

e.g. 90 B, 240 B, 1.4 KB (1495 B), 2.6MB (2,734,344 B), 0 B

Parameters:
size size in bytes
Returns:
converted size as a string - e.g. 1.4 KB (1495 B), 45 B

Definition at line 45 of file global.cpp.

CopyJob * TDEIO::copy ( const KURL &  src,
const KURL &  dest,
bool  showProgressInfo = true 
)

Copy a file or directory src into the destination dest, which can be a file (including the final filename) or a directory (into which src will be copied).

This emulates the cp command completely.

Parameters:
src the file or directory to copy
dest the destination
showProgressInfo true to show progress information
Returns:
the job handling the operation
See also:
copyAs()

Definition at line 3921 of file job.cpp.

CopyJob * TDEIO::copy ( const KURL::List &  src,
const KURL &  dest,
bool  showProgressInfo = true 
)

Copy a list of file/dirs src into a destination directory dest.

Parameters:
src the list of files and/or directories
dest the destination
showProgressInfo true to show progress information
Returns:
the job handling the operation

Definition at line 3937 of file job.cpp.

CopyJob * TDEIO::copyAs ( const KURL &  src,
const KURL &  dest,
bool  showProgressInfo = true 
)

Copy a file or directory src into the destination dest, which is the destination name in any case, even for a directory.

As opposed to copy(), this doesn't emulate cp, but is the only way to copy a directory, giving it a new name and getting an error box if a directory already exists with the same name.

Parameters:
src the file or directory to copy
dest the destination
showProgressInfo true to show progress information
Returns:
the job handling the operation

Definition at line 3929 of file job.cpp.

DavJob * TDEIO::davPropFind ( const KURL &  url,
const TQDomDocument &  properties,
TQString  depth,
bool  showProgressInfo = true 
)

Creates a new DavJob that issues a PROPFIND command.

PROPFIND retrieves the properties of the resource identified by the given url.

Parameters:
url the URL of the resource
properties a propfind document that describes the properties that should be retrieved
depth the depth of the request. Can be "0", "1" or "infinity"
showProgressInfo true to show progress information
Returns:
the new DavJob

Definition at line 117 of file davjob.cpp.

DavJob * TDEIO::davPropPatch ( const KURL &  url,
const TQDomDocument &  properties,
bool  showProgressInfo = true 
)

Creates a new DavJob that issues a PROPPATCH command.

PROPPATCH sets the properties of the resource identified by the given url.

Parameters:
url the URL of the resource
properties a PROPPACTCH document that describes the properties that should be modified and its new values
showProgressInfo true to show progress information
Returns:
the new DavJob

Definition at line 125 of file davjob.cpp.

DavJob * TDEIO::davSearch ( const KURL &  url,
const TQString &  nsURI,
const TQString &  qName,
const TQString &  query,
bool  showProgressInfo = true 
)

Creates a new DavJob that issues a SEARCH command.

Parameters:
url the URL of the resource
nsURI the URI of the search method's qualified name
qName the local part of the search method's qualified name
query the search string
showProgressInfo true to show progress information
Returns:
the new DavJob

Definition at line 130 of file davjob.cpp.

TDEIO_EXPORT TQString TDEIO::decodeFileName ( const TQString &  str  ) 

Decodes (from the filename to the text displayed) This translates 2[fF] into /, %% into %, and ∕ (U+2215, DIVISION SLASH) into /.

Parameters:
str the file name to decode
Returns:
the decoded file name

Definition at line 191 of file global.cpp.

DeleteJob * TDEIO::del ( const KURL::List &  src,
bool  shred = false,
bool  showProgressInfo = true 
)

Deletes a list of files or directories.

Parameters:
src the files to delete
shred obsolete (TODO remove in KDE4)
showProgressInfo true to show progress information
Returns:
the job handling the operation

Definition at line 4429 of file job.cpp.

DeleteJob * TDEIO::del ( const KURL &  src,
bool  shred = false,
bool  showProgressInfo = true 
)

Delete a file or directory.

Parameters:
src file to delete
shred obsolete (TODO remove in KDE4)
showProgressInfo true to show progress information
Returns:
the job handling the operation

Definition at line 4421 of file job.cpp.

TDEIO_EXPORT TQString TDEIO::encodeFileName ( const TQString &  str  ) 

Encodes (from the text displayed to the real filename) This translates % into %% and / into ∕ (U+2215, DIVISION SLASH) Used by TDEIO::link, for instance.

Parameters:
str the file name to encode
Returns:
the encoded file name

Definition at line 165 of file global.cpp.

FileCopyJob * TDEIO::file_copy ( const KURL &  src,
const KURL &  dest,
int  permissions = -1,
bool  overwrite = false,
bool  resume = false,
bool  showProgressInfo = true 
)

Copy a single file.

Uses either SlaveBase::copy() if the slave supports that or get() and put() otherwise.

Parameters:
src Where to get the file.
dest Where to put the file.
permissions May be -1. In this case no special permission mode is set.
overwrite If true, any existing file will be overwritten.
resume true to resume an operation. Warning, setting this to true means that src will be appended to dest if dest exists. You probably don't want that, so leave it to false :)
showProgressInfo true to show progress information
Returns:
the job handling the operation.

Definition at line 1998 of file job.cpp.

SimpleJob * TDEIO::file_delete ( const KURL &  src,
bool  showProgressInfo = true 
)

Delete a single file.

Parameters:
src File to delete.
showProgressInfo true to show progress information
Returns:
the job handling the operation.

Definition at line 2010 of file job.cpp.

FileCopyJob * TDEIO::file_move ( const KURL &  src,
const KURL &  dest,
int  permissions = -1,
bool  overwrite = false,
bool  resume = false,
bool  showProgressInfo = true 
)

Move a single file.

Use either SlaveBase::rename() if the slave supports that, or copy() and del() otherwise, or eventually get() & put() & del()

Parameters:
src Where to get the file.
dest Where to put the file.
permissions May be -1. In this case no special permission mode is set.
overwrite If true, any existing file will be overwritten.
resume true to resume an operation. Warning, setting this to true means that src will be appended to dest if dest exists. You probably don't want that, so leave it to false :)
showProgressInfo true to show progress information
Returns:
the job handling the operation.

Definition at line 2004 of file job.cpp.

TDEIO_EXPORT MetaInfoJob * TDEIO::fileMetaInfo ( const KFileItemList &  items  ) 

Retrieves meta information for the given items.

Parameters:
items files to get metainfo for
Returns:
the MetaInfoJob to retrieve the items

Definition at line 172 of file metainfojob.cpp.

TDEIO_EXPORT MetaInfoJob * TDEIO::fileMetaInfo ( const KURL::List &  items  ) 

Retrieves meta information for the given items.

Parameters:
items files to get metainfo for
Returns:
the MetaInfoJob to retrieve the items

Definition at line 177 of file metainfojob.cpp.

PreviewJob * TDEIO::filePreview ( const KFileItemList &  items,
int  width,
int  height = 0,
int  iconSize = 0,
int  iconAlpha = 70,
bool  scale = true,
bool  save = true,
const TQStringList *  enabledPlugins = 0 
)

Creates a PreviewJob to generate or retrieve a preview image for the given URL.

Parameters:
items files to get previews for
width the maximum width to use
height the maximum height to use, if this is 0, the same value as width is used.
iconSize the size of the mimetype icon to overlay over the preview or zero to not overlay an icon. This has no effect if the preview plugin that will be used doesn't use icon overlays.
iconAlpha transparency to use for the icon overlay
scale if the image is to be scaled to the requested size or returned in its original size
save if the image should be cached for later use
enabledPlugins if non-zero, this points to a list containing the names of the plugins that may be used.
Returns:
the new PreviewJob
See also:
PreviewJob::availablePlugins()

Definition at line 576 of file previewjob.cpp.

PreviewJob * TDEIO::filePreview ( const KURL::List &  items,
int  width,
int  height = 0,
int  iconSize = 0,
int  iconAlpha = 70,
bool  scale = true,
bool  save = true,
const TQStringList *  enabledPlugins = 0 
)

Creates a PreviewJob to generate or retrieve a preview image for the given URL.

Parameters:
items files to get previews for
width the maximum width to use
height the maximum height to use, if this is 0, the same value as width is used.
iconSize the size of the mimetype icon to overlay over the preview or zero to not overlay an icon. This has no effect if the preview plugin that will be used doesn't use icon overlays.
iconAlpha transparency to use for the icon overlay
scale if the image is to be scaled to the requested size or returned in its original size
save if the image should be cached for later use
enabledPlugins if non-zero, this points to a list containing the names of the plugins that may be used.
Returns:
the new PreviewJob
See also:
PreviewJob::availablePlugins()

Definition at line 584 of file previewjob.cpp.

TQString TDEIO::findDeviceMountPoint ( const TQString &  device  ) 

Returns the mount point where device is mounted right now.

This means, it has to be mounted, not just defined in fstab.

Definition at line 1388 of file global.cpp.

TQString TDEIO::findPathMountPoint ( const TQString &  filename  ) 

Returns the mount point on which resides filename.

For instance if /home is a separate partition, findPathMountPoint("/home/user/blah") will return /home

Parameters:
filename the file name to check
Returns:
the mount point of the given filename

Definition at line 1935 of file global.cpp.

TransferJob * TDEIO::get ( const KURL &  url,
bool  reload = false,
bool  showProgressInfo = true 
)

Get (a.k.a.

read).

The slave emits the data through data().

Parameters:
url the URL of the file
reload true to reload the file, false if it can be taken from the cache
showProgressInfo true to show progress information
Returns:
the job handling the operation.

Definition at line 1255 of file job.cpp.

TQString TDEIO::getCacheControlString ( TDEIO::CacheControl  cacheControl  ) 

Returns a string representation of the given cache control method.

Parameters:
cacheControl the cache control method
Returns:
the string representation
See also:
parseCacheControl()

Definition at line 2012 of file global.cpp.

TransferJob * TDEIO::http_post ( const KURL &  url,
const TQByteArray &  postData,
bool  showProgressInfo = true 
)

HTTP POST (for form data).

Example:

    job = TDEIO::http_post( url, postData, false );
    job->addMetaData("content-type", contentType );
    job->addMetaData("referrer", referrerURL);

postData is the data that you want to send and contentType is the complete HTTP header line that specifies the content's MIME type, for example "Content-Type: text/xml".

You MUST specify content-type!

Often contentType is "Content-Type: application/x-www-form-urlencoded" and the postData is then an ASCII string (without null-termination!) with characters like space, linefeed and percent escaped like 20, 0A and 25.

Parameters:
url Where to write the data.
postData Encoded data to post.
showProgressInfo true to display
Returns:
the job handling the operation.

Definition at line 1278 of file job.cpp.

SimpleJob * TDEIO::http_update_cache ( const KURL &  url,
bool  no_cache,
time_t  expireDate 
)

HTTP cache update.

Parameters:
url Url to update, protocol must be "http".
no_cache If true, cache entry for url is deleted.
expireDate Local machine time indicating when the entry is supposed to expire.
Returns:
the job handling the operation.

Definition at line 939 of file job.cpp.

TDEIO_EXPORT bool TDEIO::isClipboardEmpty (  ) 

Checks whether the clipboard contains any URLs.

Returns:
true if not Not used anymore, wrong method name, so it will disappear in KDE4.

Definition at line 146 of file paste.cpp.

TDEIO_EXPORT TQString TDEIO::itemsSummaryString ( uint  items,
uint  files,
uint  dirs,
TDEIO::filesize_t  size,
bool  showSize 
)

Helper for showing information about a set of files and directories.

Parameters:
items the number of items (= files + dirs + number of symlinks :)
files the number of files
dirs the number of dirs
size the sum of the size of the files
showSize whether to show the size in the result
Returns:
the summary string

Definition at line 150 of file global.cpp.

CopyJob * TDEIO::link ( const KURL &  src,
const KURL &  destDir,
bool  showProgressInfo = true 
)

Create a link.

If the protocols and hosts are the same, a Unix symlink will be created. Otherwise, a .desktop file of Type Link and pointing to the src URL will be created.

Parameters:
src The existing file or directory, 'target' of the link.
destDir Destination directory where the link will be created.
showProgressInfo true to show progress information
Returns:
the job handling the operation

Definition at line 3965 of file job.cpp.

CopyJob * TDEIO::link ( const KURL::List &  src,
const KURL &  destDir,
bool  showProgressInfo = true 
)

Create several links If the protocols and hosts are the same, a Unix symlink will be created.

Otherwise, a .desktop file of Type Link and pointing to the src URL will be created.

Parameters:
src The existing files or directories, 'targets' of the link.
destDir Destination directory where the links will be created.
showProgressInfo true to show progress information
Returns:
the job handling the operation
See also:
link()

Definition at line 3972 of file job.cpp.

CopyJob * TDEIO::linkAs ( const KURL &  src,
const KURL &  dest,
bool  showProgressInfo = true 
)

Create a link.

Unlike link() this operation will fail when the directory already exists. If the protocols and hosts are the same, a Unix symlink will be created. Otherwise, a .desktop file of Type Link and pointing to the src URL will be created.

Parameters:
src The existing file or directory, 'target' of the link.
dest Destination directory where the link will be created.
showProgressInfo true to show progress information
Returns:
the job handling the operation
See also:
link ()
copyAs()

Definition at line 3977 of file job.cpp.

ListJob * TDEIO::listDir ( const KURL &  url,
bool  showProgressInfo = true,
bool  includeHidden = true 
)

List the contents of url, which is assumed to be a directory.

"." and ".." are returned, filter them out if you don't want them.

Parameters:
url the url of the directory
showProgressInfo true to show progress information
includeHidden true for all files, false to cull out UNIX hidden files/dirs (whose names start with dot)
Returns:
the job handling the operation.

Definition at line 2187 of file job.cpp.

ListJob * TDEIO::listRecursive ( const KURL &  url,
bool  showProgressInfo = true,
bool  includeHidden = true 
)

The same as the previous method, but recurses subdirectories.

Directory links are not followed.

"." and ".." are returned but only for the toplevel directory. Filter them out if you don't want them.

Parameters:
url the url of the directory
showProgressInfo true to show progress information
includeHidden true for all files, false to cull out UNIX hidden files/dirs (whose names start with dot)
Returns:
the job handling the operation.

Definition at line 2193 of file job.cpp.

LocalURLJob * TDEIO::localURL ( const KURL &  remoteUrl  ) 

Retrieve local URL if available.

Parameters:
remoteURL the remote URL to get the local URL for
Returns:
the job handling the operation.

Definition at line 841 of file job.cpp.

bool TDEIO::manually_mounted ( const TQString &  filename  ) 

Checks if the path belongs to a filesystem that is manually mounted.

Parameters:
filename the file name to check
Returns:
true if the filesystem is manually mounted

Definition at line 1946 of file global.cpp.

MimetypeJob * TDEIO::mimetype ( const KURL &  url,
bool  showProgressInfo = true 
)

Find mimetype for one file or directory.

Parameters:
url the URL of the file
showProgressInfo true to show progress information
Returns:
the job handling the operation.

Definition at line 1544 of file job.cpp.

SimpleJob * TDEIO::mkdir ( const KURL &  url,
int  permissions = -1 
)

Creates a single directory.

Parameters:
url The URL of the directory to create.
permissions The permissions to set after creating the directory (unix-style), -1 for default permissions.
Returns:
A pointer to the job handling the operation.

Definition at line 751 of file job.cpp.

SimpleJob * TDEIO::mount ( bool  ro,
const char *  fstype,
const TQString &  dev,
const TQString &  point,
bool  showProgressInfo = true 
)

Mount filesystem.

Special job for tdeio_file.

Parameters:
ro Mount read-only if true.
fstype File system type (e.g. "ext2", can be 0L).
dev Device (e.g. /dev/sda0).
point Mount point, can be null.
showProgressInfo true to show progress information
Returns:
the job handling the operation.

Definition at line 792 of file job.cpp.

CopyJob * TDEIO::move ( const KURL::List &  src,
const KURL &  dest,
bool  showProgressInfo = true 
)

Moves a list of files or directories src to the given destination dest.

Parameters:
src the list of files or directories to copy
dest the destination
showProgressInfo true to show progress information
Returns:
the job handling the operation
See also:
copy()

Definition at line 3959 of file job.cpp.

CopyJob * TDEIO::move ( const KURL &  src,
const KURL &  dest,
bool  showProgressInfo = true 
)

Moves a file or directory src to the given destination dest.

Parameters:
src the file or directory to copy
dest the destination
showProgressInfo true to show progress information
Returns:
the job handling the operation
See also:
copy()
moveAs()

Definition at line 3943 of file job.cpp.

CopyJob * TDEIO::moveAs ( const KURL &  src,
const KURL &  dest,
bool  showProgressInfo = true 
)

Moves a file or directory src to the given destination dest.

Unlike move() this operation will fail when the directory already exists.

Parameters:
src the file or directory to copy
dest the destination
showProgressInfo true to show progress information
Returns:
the job handling the operation
See also:
copyAs()

Definition at line 3951 of file job.cpp.

MultiGetJob * TDEIO::multi_get ( long  id,
const KURL &  url,
const MetaData &  metaData 
)

Creates a new multiple get job.

Parameters:
id the id of the get operation
url the URL of the file
metaData the MetaData associated with the file
Returns:
the job handling the operation.
See also:
get()

Definition at line 4603 of file job.cpp.

TDEIO_EXPORT TQString TDEIO::number ( TDEIO::filesize_t  size  ) 

Converts a size to a string representation Not unlike TQString::number(...).

Parameters:
size size in bytes
Returns:
converted size as a string - e.g. 123456789

Definition at line 96 of file global.cpp.

TDEIO::CacheControl TDEIO::parseCacheControl ( const TQString &  cacheControl  ) 

Parses the string representation of the cache control option.

Parameters:
cacheControl the string representation
Returns:
the cache control value
See also:
getCacheControlString()

Definition at line 1993 of file global.cpp.

TDEIO_EXPORT TQString TDEIO::pasteActionText (  ) 

Returns the text to use for the Paste action, when the application supports pasting files, urls, and clipboard data, using pasteClipboard().

Returns:
a string suitable for TDEAction::setText, or an empty string if pasting isn't possible right now.
Since:
3.5

Definition at line 291 of file paste.cpp.

TDEIO_EXPORT TDEIO::Job * TDEIO::pasteClipboard ( const KURL &  destURL,
bool  move = false 
)

Pastes the content of the clipboard to the given destination URL.

URLs are treated separately (performing a file copy) from other data (which is saved into a file after asking the user to choose a filename and the preferred data format)

Parameters:
destURL the URL to receive the data
move true to move the data, false to copy
Returns:
the job that handles the operation
See also:
pasteData()

Definition at line 210 of file paste.cpp.

TDEIO_EXPORT void TDEIO::pasteData ( const KURL &  destURL,
const TQByteArray &  data 
)

Pastes the given data to the given destination URL.

NOTE: This method is blocking (uses NetAccess for saving the data). Please consider using pasteDataAsync instead.

Parameters:
destURL the URL of the directory where the data will be pasted. The filename to use in that directory is prompted by this method.
data the data to copy
See also:
pasteClipboard()

Definition at line 259 of file paste.cpp.

TDEIO_EXPORT TDEIO::CopyJob * TDEIO::pasteDataAsync ( const KURL &  destURL,
const TQByteArray &  data,
const TQString &  dialogText 
)

Pastes the given data to the given destination URL.

Note that this method requires the caller to have chosen the QByteArray to paste before hand, unlike pasteClipboard and pasteMimeSource.

Parameters:
destURL the URL of the directory where the data will be pasted. The filename to use in that directory is prompted by this method.
data the data to copy
dialogText the text to show in the dialog
See also:
pasteClipboard()

Definition at line 281 of file paste.cpp.

TDEIO_EXPORT TDEIO::CopyJob * TDEIO::pasteDataAsync ( const KURL &  destURL,
const TQByteArray &  data 
)

Pastes the given data to the given destination URL.

Note that this method requires the caller to have chosen the QByteArray to paste before hand, unlike pasteClipboard and pasteMimeSource.

Parameters:
destURL the URL of the directory where the data will be pasted. The filename to use in that directory is prompted by this method.
data the data to copy
See also:
pasteClipboard()

Definition at line 276 of file paste.cpp.

TDEIO::CopyJob * TDEIO::pasteMimeSource ( TQMimeSource *  data,
const KURL &  destURL,
const TQString &  dialogText,
TQWidget *  widget,
bool  clipboard = false 
)

Save the given mimesource data to the given destination URL after offering the user to choose a data format.

This is the method used when handling drops (of anything else than URLs) onto kdesktop and konqueror.

Parameters:
data the TQMimeSource (e.g. a TQDropEvent)
destURL the URL of the directory where the data will be pasted. The filename to use in that directory is prompted by this method.
dialogText the text to show in the dialog
widget parent widget to use for dialogs
clipboard whether the TQMimeSource comes from TQClipboard. If you use pasteClipboard for that case, you never have to worry about this parameter.
See also:
pasteClipboard()
Since:
3.5

Definition at line 164 of file paste.cpp.

bool TDEIO::probably_slow_mounted ( const TQString &  filename  ) 

Checks if the path belongs to a filesystem that is probably slow.

It checks for NFS or for paths belonging to automounted paths not yet mounted

Parameters:
filename the file name to check
Returns:
true if the filesystem is probably slow

Definition at line 1958 of file global.cpp.

TransferJob * TDEIO::put ( const KURL &  url,
int  permissions,
bool  overwrite,
bool  resume,
bool  showProgressInfo = true 
)

Put (a.k.a.

write)

Parameters:
url Where to write data.
permissions May be -1. In this case no special permission mode is set.
overwrite If true, any existing file will be overwritten.
resume true to resume an operation. Warning, setting this to true means that the data will be appended to dest if dest exists.
showProgressInfo true to show progress information
Returns:
the job handling the operation.
See also:
multi_get()

Definition at line 1415 of file job.cpp.

TDEIO_EXPORT TQByteArray TDEIO::rawErrorDetail ( int  errorCode,
const TQString &  errorText,
const KURL *  reqUrl = 0L,
int  method = -1 
)

Returns translated error details for errorCode using the additional error information provided by errorText , reqUrl (the request URL), and the ioslave method .

Parameters:
errorCode the error code
errorText the additional error text
reqUrl the request URL
method the ioslave method
Returns:
the following data:
  • TQString errorName - the name of the error
  • TQString techName - if not null, the more technical name of the error
  • TQString description - a description of the error
  • TQStringList causes - a list of possible causes of the error
  • TQStringList solutions - a liso of solutions for the error

Definition at line 528 of file global.cpp.

SimpleJob * TDEIO::rename ( const KURL &  src,
const KURL &  dest,
bool  overwrite 
)

Rename a file or directory.

Warning: this operation fails if a direct renaming is not possible (like with files or dirs on separate partitions) Use move or file_move in this case.

Parameters:
src The original URL
dest The final URL
overwrite whether to automatically overwrite if the dest exists
Returns:
the job handling the operation.

Definition at line 772 of file job.cpp.

SimpleJob * TDEIO::rmdir ( const KURL &  url  ) 

Removes a single directory.

The directory is assumed to be empty.

Parameters:
url The URL of the directory to remove.
Returns:
A pointer to the job handling the operation.

Definition at line 758 of file job.cpp.

SimpleJob * TDEIO::special ( const KURL &  url,
const TQByteArray &  data,
bool  showProgressInfo = true 
)

Execute any command that is specific to one slave (protocol).

Examples are : HTTP POST, mount and unmount (tdeio_file)

Parameters:
url The URL isn't passed to the slave, but is used to know which slave to send it to :-)
data Packed data. The meaning is completely dependent on the slave, but usually starts with an int for the command number.
showProgressInfo true to show progress information
Returns:
the job handling the operation.

Definition at line 786 of file job.cpp.

StatJob * TDEIO::stat ( const KURL &  url,
bool  showProgressInfo = true 
)

Find all details for one file or directory.

Parameters:
url the URL of the file
showProgressInfo true to show progress information
Returns:
the job handling the operation.

Definition at line 921 of file job.cpp.

StatJob * TDEIO::stat ( const KURL &  url,
bool  sideIsSource,
short int  details,
bool  showProgressInfo = true 
)

Find all details for one file or directory.

This version of the call includes two additional booleans, sideIsSource and details.

Parameters:
url the URL of the file
sideIsSource is true when stating a source file (we will do a get on it if the stat works) and false when stating a destination file (target of a copy). The reason for this parameter is that in some cases the tdeioslave might not be able to determine a file's existence (e.g. HTTP doesn't allow it, FTP has issues with case-sensitivity on some systems). When the slave can't reliably determine the existence of a file, it will:

  • be optimistic if sideIsSource=true, i.e. it will assume the file exists, and if it doesn't this will appear when actually trying to download it
  • be pessimistic if sideIsSource=false, i.e. it will assume the file doesn't exist, to prevent showing "about to overwrite" errors to the user. If you simply want to check for existence without downloading/uploading afterwards, then you should use sideIsSource=false.
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.
showProgressInfo true to show progress information
Returns:
the job handling the operation.

Definition at line 927 of file job.cpp.

StoredTransferJob * TDEIO::storedGet ( const KURL &  url,
bool  reload = false,
bool  showProgressInfo = true 
)

Get (a.k.a.

read), into a single TQByteArray.

See also:
StoredTransferJob
Parameters:
url the URL of the file
reload true to reload the file, false if it can be taken from the cache
showProgressInfo true to show progress information
Returns:
the job handling the operation.
Since:
3.3

Definition at line 1476 of file job.cpp.

StoredTransferJob * TDEIO::storedPut ( const TQByteArray &  arr,
const KURL &  url,
int  permissions,
bool  overwrite,
bool  resume,
bool  showProgressInfo = true 
)

Put (a.k.a.

write) data from a single TQByteArray.

See also:
StoredTransferJob
Parameters:
arr The data to write
url Where to write data.
permissions May be -1. In this case no special permission mode is set.
overwrite If true, any existing file will be overwritten.
resume true to resume an operation. Warning, setting this to true means that the data will be appended to dest if dest exists.
showProgressInfo true to show progress information
Returns:
the job handling the operation.
Since:
3.3

Definition at line 1486 of file job.cpp.

SimpleJob * TDEIO::symlink ( const TQString &  target,
const KURL &  dest,
bool  overwrite,
bool  showProgressInfo = true 
)

Create or move a symlink.

This is the lowlevel operation, similar to file_copy and file_move. It doesn't do any check (other than those the slave does) and it doesn't show rename and skip dialogs - use TDEIO::link for that.

Parameters:
target The string that will become the "target" of the link (can be relative)
dest The symlink to create.
overwrite whether to automatically overwrite if the dest exists
showProgressInfo true to show progress information
Returns:
the job handling the operation.

Definition at line 779 of file job.cpp.

bool TDEIO::testFileSystemFlag ( const TQString &  filename,
FileSystemFlag  flag 
)

Checks the capabilities of the filesystem to which a given file belongs.

given feature (e.g. chmod).

Parameters:
filename the file name to check
flag the flag to check
Returns:
true if the filesystem has that flag, false if not (or some error occurred)

The availables flags are:

  • SupportsChmod: returns true if the filesystem supports chmod (e.g. msdos filesystems return false)
  • SupportsChown: returns true if the filesystem supports chown (e.g. msdos filesystems return false)
  • SupportsUtime: returns true if the filesystems supports utime (e.g. msdos filesystems return false)
  • SupportsSymlinks: returns true if the filesystems supports symlinks (e.g. msdos filesystems return false)
  • CaseInsensitive: returns true if the filesystem treats "foo" and "FOO" as being the same file (true for msdos systems)

Definition at line 1970 of file global.cpp.

CopyJob * TDEIO::trash ( const KURL &  src,
bool  showProgressInfo = true 
)

Trash a file or directory.

This is currently only supported for local files and directories. Use "KURL src; src.setPath( path );" to create a URL from a path.

Parameters:
src file to delete
showProgressInfo true to show progress information
Returns:
the job handling the operation
Since:
3.4

Definition at line 3984 of file job.cpp.

CopyJob * TDEIO::trash ( const KURL::List &  src,
bool  showProgressInfo = true 
)

Trash a list of files or directories.

This is currently only supported for local files and directories.

Parameters:
src the files to delete
showProgressInfo true to show progress information
Returns:
the job handling the operation
Since:
3.4

Definition at line 3991 of file job.cpp.

SimpleJob * TDEIO::unmount ( const TQString &  point,
bool  showProgressInfo = true 
)

Unmount filesystem.

Special job for tdeio_file.

Parameters:
point Point to unmount.
showProgressInfo true to show progress information
Returns:
the job handling the operation.

Definition at line 802 of file job.cpp.

TDEIO_EXPORT TQString TDEIO::unsupportedActionErrorString ( const TQString &  protocol,
int  cmd 
)

Returns an appropriate error message if the given command cmd is an unsupported action (ERR_UNSUPPORTED_ACTION).

Parameters:
protocol name of the protocol
cmd given command
See also:
enum Command
Since:
3.2

Definition at line 439 of file global.cpp.

tdeio/tdeio

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

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdeio by doxygen 1.7.1
This website is maintained by Timothy Pearson.