org.kde.koala

Class KIO

public class KIO extends Object

UNKNOWN: A namespace for KIO globals.

Field Summary
static intCaseInsensitive
static intCC_Cache
static intCC_CacheOnly
Specifies how to use the cache.
static intCC_Refresh
static intCC_Reload
static intCC_Verify
static intCMD_CHMOD
static intCMD_CONFIG
static intCMD_CONNECT
static intCMD_COPY
static intCMD_DEL
static intCMD_DISCONNECT
static intCMD_GET
static intCMD_HOST
Commands that can be invoked by a job.
static intCMD_LISTDIR
static intCMD_MESSAGEBOXANSWER
static intCMD_META_DATA
static intCMD_MIMETYPE
static intCMD_MKDIR
static intCMD_MULTI_GET
static intCMD_NONE
static intCMD_PUT
static intCMD_RENAME
static intCMD_REPARSECONFIGURATION
static intCMD_RESUMEANSWER
static intCMD_SLAVE_CONNECT
static intCMD_SLAVE_HOLD
static intCMD_SLAVE_STATUS
static intCMD_SPECIAL
static intCMD_STAT
static intCMD_SUBURL
static intCMD_SYMLINK
static intCMD_TESTDIR
static intCMD_USERPASS
static intDAV_COPY
static intDAV_LOCK
static intDAV_MKCOL
static intDAV_MOVE
static intDAV_NOTIFY
static intDAV_POLL
static intDAV_PROPFIND
static intDAV_PROPPATCH
static intDAV_SEARCH
static intDAV_SUBSCRIBE
static intDAV_UNLOCK
static intDAV_UNSUBSCRIBE
static intDEFAULT
static intERR_ABORTED
static intERR_ACCESS_DENIED
static intERR_CANNOT_CHMOD
static intERR_CANNOT_DELETE
static intERR_CANNOT_DELETE_ORIGINAL
static intERR_CANNOT_DELETE_PARTIAL
static intERR_CANNOT_ENTER_DIRECTORY
static intERR_CANNOT_LAUNCH_PROCESS
static intERR_CANNOT_OPEN_FOR_READING
Error codes that can be emitted by KIO.
static intERR_CANNOT_OPEN_FOR_WRITING
static intERR_CANNOT_RENAME
static intERR_CANNOT_RENAME_ORIGINAL
static intERR_CANNOT_RENAME_PARTIAL
static intERR_CANNOT_RESUME
static intERR_CANNOT_SYMLINK
static intERR_CONNECTION_BROKEN
static intERR_COULD_NOT_ACCEPT
static intERR_COULD_NOT_AUTHENTICATE
static intERR_COULD_NOT_BIND
static intERR_COULD_NOT_CLOSEDIR
static intERR_COULD_NOT_CONNECT
static intERR_COULD_NOT_CREATE_SOCKET
static intERR_COULD_NOT_LISTEN
static intERR_COULD_NOT_LOGIN
static intERR_COULD_NOT_MKDIR
static intERR_COULD_NOT_MOUNT
static intERR_COULD_NOT_READ
static intERR_COULD_NOT_RMDIR
static intERR_COULD_NOT_STAT
static intERR_COULD_NOT_UNMOUNT
static intERR_COULD_NOT_WRITE
static intERR_CYCLIC_COPY
static intERR_CYCLIC_LINK
static intERR_DIR_ALREADY_EXIST
static intERR_DISK_FULL
static intERR_DOES_NOT_EXIST
static intERR_FILE_ALREADY_EXIST
static intERR_IDENTICAL_FILES
static intERR_INTERNAL
static intERR_INTERNAL_SERVER
static intERR_IS_DIRECTORY
static intERR_IS_FILE
static intERR_MALFORMED_URL
static intERR_NEED_PASSWD
static intERR_NOT_FILTER_PROTOCOL
static intERR_NO_CONTENT
static intERR_NO_SOURCE_PROTOCOL
static intERR_OUT_OF_MEMORY
static intERR_POST_DENIED
static intERR_PROTOCOL_IS_NOT_A_FILESYSTEM
static intERR_SERVER_TIMEOUT
static intERR_SERVICE_NOT_AVAILABLE
static intERR_SLAVE_DEFINED
static intERR_SLAVE_DIED
static intERR_UNKNOWN
static intERR_UNKNOWN_HOST
static intERR_UNKNOWN_INTERRUPT
static intERR_UNKNOWN_PROXY_HOST
static intERR_UNSUPPORTED_ACTION
static intERR_UNSUPPORTED_PROTOCOL
static intERR_UPGRADE_REQUIRED
static intERR_USER_CANCELED
static intERR_WRITE_ACCESS_DENIED
static intHTTP_DELETE
static intHTTP_GET
HTTP / DAV method * @short HTTP / DAV method
static intHTTP_HEAD
static intHTTP_OPTIONS
static intHTTP_POST
static intHTTP_PUT
static intHTTP_UNKNOWN
static intINF_ERROR_PAGE
static intINF_GETTING_FILE
static intINF_INFOMESSAGE
static intINF_MESSAGEBOX
static intINF_META_DATA
static intINF_MIME_TYPE
static intINF_NEED_PASSWD
static intINF_NETWORK_STATUS
static intINF_PROCESSED_SIZE
static intINF_REDIRECTION
static intINF_SPEED
static intINF_TOTAL_SIZE
Identifiers for KIO informational messages.
static intINF_WARNING
static intLIST
static intMSG_AUTH_KEY
static intMSG_CANRESUME
static intMSG_CONNECTED
static intMSG_DATA
Identifiers for KIO data messages.
static intMSG_DATA_REQ
static intMSG_DEL_AUTH_KEY
static intMSG_ERROR
static intMSG_FINISHED
static intMSG_LIST_ENTRIES
static intMSG_NEED_SUBURL_DATA
static intMSG_NET_DROP
static intMSG_NET_REQUEST
static intMSG_RENAMED
static intMSG_RESUME
static intMSG_SLAVE_ACK
static intMSG_SLAVE_STATUS
static intMSG_STAT_ENTRY
static intM_MULTI
static intM_NORENAME
static intM_OVERWRITE
static intM_OVERWRITE_ITSELF
static intM_RESUME
static intM_SINGLE
static intM_SKIP
static intR_AUTO_SKIP
static intR_CANCEL
static intR_OVERWRITE
static intR_OVERWRITE_ALL
static intR_RENAME
static intR_RESUME
The result of open_RenameDlg().
static intR_RESUME_ALL
static intR_SKIP
static intSTATUSBAR
static intSupportsChmod
static intSupportsChown
static intSupportsSymlinks
static intSupportsUTime
static intS_AUTO_SKIP
static intS_CANCEL
static intS_SKIP
static intUDS_ACCESS
static intUDS_ACCESS_TIME
static intUDS_ACL_STRING
static intUDS_CREATION_TIME
static intUDS_DEFAULT_ACL_STRING
static intUDS_EXTENDED_ACL
static intUDS_EXTRA
static intUDS_FILE_TYPE
static intUDS_GROUP
static intUDS_GUESSED_MIME_TYPE
static intUDS_HIDDEN
static intUDS_ICON_NAME
static intUDS_LINK_DEST
static intUDS_LOCAL_PATH
static intUDS_LONG
static intUDS_MIME_TYPE
static intUDS_MODIFICATION_TIME
static intUDS_NAME
static intUDS_SIZE
static intUDS_SIZE_LARGE
static intUDS_STRING
Constants used to specify the type of a KUDSAtom.
static intUDS_TIME
static intUDS_URL
static intUDS_USER
static intUDS_XML_PROPERTIES
Method Summary
static StringbuildErrorString(int errorCode, String errorText)
Returns a translated error message for errorCode using the additional error information provided by errorText.
static SimpleJobchmod(KURL url, int permissions)
Changes permissions on a file or directory.
static StringconvertSeconds(int seconds)
Convert seconds to a string representing number of days, hours, minutes and seconds
static StringconvertSize(long size)
Converts size from bytes to the string representation.
static StringconvertSizeFromKB(long kbSize)
Converts size from kilo-bytes to the string representation.
static StringconvertSizeWithBytes(long size)
Converts size from bytes to a string representation with includes the size in bytes. e.g.
static CopyJobcopy(KURL src, KURL dest, boolean showProgressInfo)
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).
static CopyJobcopy(KURL src, KURL dest)
static CopyJobcopy(ArrayList src, KURL dest, boolean showProgressInfo)
Copy a list of file/dirs src into a destination directory dest.
static CopyJobcopy(ArrayList src, KURL dest)
static CopyJobcopyAs(KURL src, KURL dest, boolean showProgressInfo)
Copy a file or directory src into the destination dest, which is the destination name in any case, even for a directory.
static CopyJobcopyAs(KURL src, KURL dest)
static DavJobdavPropFind(KURL url, QDomDocument properties, String depth, boolean showProgressInfo)
Creates a new DavJob that issues a PROPFIND command.
static DavJobdavPropFind(KURL url, QDomDocument properties, String depth)
static DavJobdavPropPatch(KURL url, QDomDocument properties, boolean showProgressInfo)
Creates a new DavJob that issues a PROPPATCH command.
static DavJobdavPropPatch(KURL url, QDomDocument properties)
static DavJobdavSearch(KURL url, String nsURI, String qName, String query, boolean showProgressInfo)
Creates a new DavJob that issues a SEARCH command.
static DavJobdavSearch(KURL url, String nsURI, String qName, String query)
static StringdecodeFileName(String str)
Decodes (from the filename to the text displayed) This translates %2[fF] into / and %% into %
static DeleteJobdel(KURL src, boolean shred, boolean showProgressInfo)
Delete a file or directory.
static DeleteJobdel(KURL src, boolean shred)
static DeleteJobdel(KURL src)
static DeleteJobdel(ArrayList src, boolean shred, boolean showProgressInfo)
Deletes a list of files or directories.
static DeleteJobdel(ArrayList src, boolean shred)
static DeleteJobdel(ArrayList src)
static StringencodeFileName(String str)
Encodes (from the text displayed to the real filename) This translates % into %% and / into %2f Used by KIO.link, for instance.
static MetaInfoJobfileMetaInfo(ArrayList items)
Retrieves meta information for the given items.
static PreviewJobfilePreview(ArrayList items, int width, int height, int iconSize, int iconAlpha, boolean scale, boolean save, String[] enabledPlugins)
Creates a PreviewJob to generate or retrieve a preview image for the given URL.
static PreviewJobfilePreview(ArrayList items, int width, int height, int iconSize, int iconAlpha, boolean scale, boolean save)
static PreviewJobfilePreview(ArrayList items, int width, int height, int iconSize, int iconAlpha, boolean scale)
static PreviewJobfilePreview(ArrayList items, int width, int height, int iconSize, int iconAlpha)
static PreviewJobfilePreview(ArrayList items, int width, int height, int iconSize)
static PreviewJobfilePreview(ArrayList items, int width, int height)
static PreviewJobfilePreview(ArrayList items, int width)
static FileCopyJobfile_copy(KURL src, KURL dest, int permissions, boolean overwrite, boolean resume, boolean showProgressInfo)
Copy a single file.
static FileCopyJobfile_copy(KURL src, KURL dest, int permissions, boolean overwrite, boolean resume)
static FileCopyJobfile_copy(KURL src, KURL dest, int permissions, boolean overwrite)
static FileCopyJobfile_copy(KURL src, KURL dest, int permissions)
static FileCopyJobfile_copy(KURL src, KURL dest)
static SimpleJobfile_delete(KURL src, boolean showProgressInfo)
Delete a single file.
static SimpleJobfile_delete(KURL src)
static FileCopyJobfile_move(KURL src, KURL dest, int permissions, boolean overwrite, boolean resume, boolean showProgressInfo)
Move a single file.
static FileCopyJobfile_move(KURL src, KURL dest, int permissions, boolean overwrite, boolean resume)
static FileCopyJobfile_move(KURL src, KURL dest, int permissions, boolean overwrite)
static FileCopyJobfile_move(KURL src, KURL dest, int permissions)
static FileCopyJobfile_move(KURL src, KURL dest)
static StringfindDeviceMountPoint(String device)
Returns the mount point where device is mounted right now.
static StringfindPathMountPoint(String filename)
Returns the mount point on which resides filename. For instance if /home is a separate partition, findPathMountPoint("/home/user/blah") will return /home
static TransferJobget(KURL url, boolean reload, boolean showProgressInfo)
Get (a.k.a. read).
static TransferJobget(KURL url, boolean reload)
static TransferJobget(KURL url)
static StringgetCacheControlString(int cacheControl)
Returns a string representation of the given cache control method.
static TransferJobhttp_post(KURL url, byte[] postData, boolean showProgressInfo)
HTTP POST (for form data).
static TransferJobhttp_post(KURL url, byte[] postData)
static SimpleJobhttp_update_cache(KURL url, boolean no_cache, int expireDate)
HTTP cache update
static booleanisClipboardEmpty()
Checks whether the clipboard contains any URLs.
static StringitemsSummaryString(int items, int files, int dirs, long size, boolean showSize)
Helper for showing information about a set of files and directories
static CopyJoblink(KURL src, KURL destDir, boolean showProgressInfo)
Create a link.
static CopyJoblink(KURL src, KURL destDir)
static CopyJoblink(ArrayList src, KURL destDir, boolean showProgressInfo)
Create several links If the protocols and hosts are the same, a Unix symlink will be created.
static CopyJoblink(ArrayList src, KURL destDir)
static CopyJoblinkAs(KURL src, KURL dest, boolean showProgressInfo)
Create a link.
static CopyJoblinkAs(KURL src, KURL dest)
static ListJoblistDir(KURL url, boolean showProgressInfo, boolean includeHidden)
List the contents of url, which is assumed to be a directory.
static ListJoblistDir(KURL url, boolean showProgressInfo)
static ListJoblistDir(KURL url)
static ListJoblistRecursive(KURL url, boolean showProgressInfo, boolean includeHidden)
The same as the previous method, but recurses subdirectories.
static ListJoblistRecursive(KURL url, boolean showProgressInfo)
static ListJoblistRecursive(KURL url)
static booleanmanually_mounted(String filename)
Checks if the path belongs to a filesystem that is manually mounted.
static MimetypeJobmimetype(KURL url, boolean showProgressInfo)
Find mimetype for one file or directory.
static MimetypeJobmimetype(KURL url)
static SimpleJobmkdir(KURL url, int permissions)
Creates a single directory.
static SimpleJobmkdir(KURL url)
static SimpleJobmount(boolean ro, String fstype, String dev, String point, boolean showProgressInfo)
Mount filesystem.
static SimpleJobmount(boolean ro, String fstype, String dev, String point)
static CopyJobmove(KURL src, KURL dest, boolean showProgressInfo)
Moves a file or directory src to the given destination dest.
static CopyJobmove(KURL src, KURL dest)
static CopyJobmove(ArrayList src, KURL dest, boolean showProgressInfo)
Moves a list of files or directories src to the given destination dest.
static CopyJobmove(ArrayList src, KURL dest)
static CopyJobmoveAs(KURL src, KURL dest, boolean showProgressInfo)
Moves a file or directory src to the given destination dest. Unlike move() this operation will fail when the directory already exists.
static CopyJobmoveAs(KURL src, KURL dest)
static Stringnumber(long size)
Converts a size to a string representation Not unlike String.number(...)
static intopen_RenameDlg(String caption, String src, String dest, int mode, StringBuffer newDestPath, long sizeSrc, long sizeDest, int ctimeSrc, int ctimeDest, int mtimeSrc, int mtimeDest)
  • RenameDlg related Functions
  • KIO Construct a modal, parent-less "rename" dialog, and return a result code, as well as the new dest.
    static intopen_RenameDlg(String caption, String src, String dest, int mode, StringBuffer newDestPath, long sizeSrc, long sizeDest, int ctimeSrc, int ctimeDest, int mtimeSrc)
    static intopen_RenameDlg(String caption, String src, String dest, int mode, StringBuffer newDestPath, long sizeSrc, long sizeDest, int ctimeSrc, int ctimeDest)
    static intopen_RenameDlg(String caption, String src, String dest, int mode, StringBuffer newDestPath, long sizeSrc, long sizeDest, int ctimeSrc)
    static intopen_RenameDlg(String caption, String src, String dest, int mode, StringBuffer newDestPath, long sizeSrc, long sizeDest)
    static intopen_RenameDlg(String caption, String src, String dest, int mode, StringBuffer newDestPath, long sizeSrc)
    static intopen_RenameDlg(String caption, String src, String dest, int mode, StringBuffer newDestPath)
    static intopen_SkipDlg(boolean _multi, String _error_text)
    static intopen_SkipDlg(boolean _multi)
    static QDataStreamop_read(QDataStream s, AuthInfo a)
    static QDataStreamop_write(QDataStream s, AuthInfo a)
    static intparseCacheControl(String cacheControl)
    Parses the string representation of the cache control option.
    static StringpasteActionText()
    Returns the text to use for the Paste action, when the application supports pasting files, urls, and clipboard data, using pasteClipboard().
    static JobpasteClipboard(KURL destURL, boolean move)
    Pastes the content of the clipboard to the given destination URL.
    static JobpasteClipboard(KURL destURL)
    static voidpasteData(KURL destURL, byte[] data)
    Pastes the given data to the given destination URL.
    static CopyJobpasteDataAsync(KURL destURL, byte[] data)
    Pastes the given data to the given destination URL.
    static CopyJobpasteDataAsync(KURL destURL, byte[] data, String dialogText)
    Pastes the given data to the given destination URL.
    static CopyJobpasteMimeSource(QMimeSourceInterface data, KURL destURL, String dialogText, QWidget widget, boolean clipboard)
    Save the given mimesource data to the given destination URL after offering the user to choose a data format.
    static CopyJobpasteMimeSource(QMimeSourceInterface data, KURL destURL, String dialogText, QWidget widget)
    static booleanprobably_slow_mounted(String filename)
    Checks if the path belongs to a filesystem that is probably slow.
    static TransferJobput(KURL url, int permissions, boolean overwrite, boolean resume, boolean showProgressInfo)
    Put (a.k.a. write)
    static TransferJobput(KURL url, int permissions, boolean overwrite, boolean resume)
    static byte[]rawErrorDetail(int errorCode, String errorText, KURL reqUrl, int method)
    Returns translated error details for errorCode using the additional error information provided by errorText , reqUrl (the request URL), and the ioslave method .
    static byte[]rawErrorDetail(int errorCode, String errorText, KURL reqUrl)
    static byte[]rawErrorDetail(int errorCode, String errorText)
    static SimpleJobrename(KURL src, KURL dest, boolean overwrite)
    Rename a file or directory.
    static SimpleJobrmdir(KURL url)
    Removes a single directory.
    static SimpleJobspecial(KURL url, byte[] data, boolean showProgressInfo)
    Execute any command that is specific to one slave (protocol).
    static SimpleJobspecial(KURL url, byte[] data)
    static StatJobstat(KURL url, boolean showProgressInfo)
    Find all details for one file or directory.
    static StatJobstat(KURL url)
    static StatJobstat(KURL url, boolean sideIsSource, short details, boolean showProgressInfo)
    Find all details for one file or directory.
    static StatJobstat(KURL url, boolean sideIsSource, short details)
    static StoredTransferJobstoredGet(KURL url, boolean reload, boolean showProgressInfo)
    Get (a.k.a. read), into a single byte[].
    static StoredTransferJobstoredGet(KURL url, boolean reload)
    static StoredTransferJobstoredGet(KURL url)
    static StoredTransferJobstoredPut(byte[] arr, KURL url, int permissions, boolean overwrite, boolean resume, boolean showProgressInfo)
    Put (a.k.a. write) data from a single byte[].
    static StoredTransferJobstoredPut(byte[] arr, KURL url, int permissions, boolean overwrite, boolean resume)
    static SimpleJobsymlink(String target, KURL dest, boolean overwrite, boolean showProgressInfo)
    Create or move a symlink.
    static SimpleJobsymlink(String target, KURL dest, boolean overwrite)
    static booleantestFileSystemFlag(String filename, int flag)
    Checks the capabilities of the filesystem to which a given file belongs. given feature (e.g. chmod).
    static CopyJobtrash(KURL src, boolean showProgressInfo)
    Trash a file or directory.
    static CopyJobtrash(KURL src)
    static CopyJobtrash(ArrayList src, boolean showProgressInfo)
    Trash a list of files or directories.
    static CopyJobtrash(ArrayList src)
    static SimpleJobunmount(String point, boolean showProgressInfo)
    Unmount filesystem.
    static SimpleJobunmount(String point)
    static StringunsupportedActionErrorString(String protocol, int cmd)
    Returns an appropriate error message if the given command cmd is an unsupported action (ERR_UNSUPPORTED_ACTION).

    Field Detail

    CaseInsensitive

    public static final int CaseInsensitive

    CC_Cache

    public static final int CC_Cache

    CC_CacheOnly

    public static final int CC_CacheOnly
    Specifies how to use the cache.

    See Also: KIO KIO

    UNKNOWN: Specifies how to use the cache.

    CC_Refresh

    public static final int CC_Refresh

    CC_Reload

    public static final int CC_Reload

    CC_Verify

    public static final int CC_Verify

    CMD_CHMOD

    public static final int CMD_CHMOD

    CMD_CONFIG

    public static final int CMD_CONFIG

    CMD_CONNECT

    public static final int CMD_CONNECT

    CMD_COPY

    public static final int CMD_COPY

    CMD_DEL

    public static final int CMD_DEL

    CMD_DISCONNECT

    public static final int CMD_DISCONNECT

    CMD_GET

    public static final int CMD_GET

    CMD_HOST

    public static final int CMD_HOST
    Commands that can be invoked by a job.

    UNKNOWN: Commands that can be invoked by a job.

    CMD_LISTDIR

    public static final int CMD_LISTDIR

    CMD_MESSAGEBOXANSWER

    public static final int CMD_MESSAGEBOXANSWER

    CMD_META_DATA

    public static final int CMD_META_DATA

    CMD_MIMETYPE

    public static final int CMD_MIMETYPE

    CMD_MKDIR

    public static final int CMD_MKDIR

    CMD_MULTI_GET

    public static final int CMD_MULTI_GET

    CMD_NONE

    public static final int CMD_NONE

    CMD_PUT

    public static final int CMD_PUT

    CMD_RENAME

    public static final int CMD_RENAME

    CMD_REPARSECONFIGURATION

    public static final int CMD_REPARSECONFIGURATION

    CMD_RESUMEANSWER

    public static final int CMD_RESUMEANSWER

    CMD_SLAVE_CONNECT

    public static final int CMD_SLAVE_CONNECT

    CMD_SLAVE_HOLD

    public static final int CMD_SLAVE_HOLD

    CMD_SLAVE_STATUS

    public static final int CMD_SLAVE_STATUS

    CMD_SPECIAL

    public static final int CMD_SPECIAL

    CMD_STAT

    public static final int CMD_STAT

    CMD_SUBURL

    public static final int CMD_SUBURL

    CMD_SYMLINK

    public static final int CMD_SYMLINK

    CMD_TESTDIR

    public static final int CMD_TESTDIR

    CMD_USERPASS

    public static final int CMD_USERPASS

    DAV_COPY

    public static final int DAV_COPY

    DAV_LOCK

    public static final int DAV_LOCK

    DAV_MKCOL

    public static final int DAV_MKCOL

    DAV_MOVE

    public static final int DAV_MOVE

    DAV_NOTIFY

    public static final int DAV_NOTIFY

    DAV_POLL

    public static final int DAV_POLL

    DAV_PROPFIND

    public static final int DAV_PROPFIND

    DAV_PROPPATCH

    public static final int DAV_PROPPATCH

    DAV_SEARCH

    public static final int DAV_SEARCH

    DAV_SUBSCRIBE

    public static final int DAV_SUBSCRIBE

    DAV_UNLOCK

    public static final int DAV_UNLOCK

    DAV_UNSUBSCRIBE

    public static final int DAV_UNSUBSCRIBE

    DEFAULT

    public static final int DEFAULT

    ERR_ABORTED

    public static final int ERR_ABORTED

    ERR_ACCESS_DENIED

    public static final int ERR_ACCESS_DENIED

    ERR_CANNOT_CHMOD

    public static final int ERR_CANNOT_CHMOD

    ERR_CANNOT_DELETE

    public static final int ERR_CANNOT_DELETE

    ERR_CANNOT_DELETE_ORIGINAL

    public static final int ERR_CANNOT_DELETE_ORIGINAL

    ERR_CANNOT_DELETE_PARTIAL

    public static final int ERR_CANNOT_DELETE_PARTIAL

    ERR_CANNOT_ENTER_DIRECTORY

    public static final int ERR_CANNOT_ENTER_DIRECTORY

    ERR_CANNOT_LAUNCH_PROCESS

    public static final int ERR_CANNOT_LAUNCH_PROCESS

    ERR_CANNOT_OPEN_FOR_READING

    public static final int ERR_CANNOT_OPEN_FOR_READING
    Error codes that can be emitted by KIO.

    UNKNOWN: Error codes that can be emitted by KIO.

    ERR_CANNOT_OPEN_FOR_WRITING

    public static final int ERR_CANNOT_OPEN_FOR_WRITING

    ERR_CANNOT_RENAME

    public static final int ERR_CANNOT_RENAME

    ERR_CANNOT_RENAME_ORIGINAL

    public static final int ERR_CANNOT_RENAME_ORIGINAL

    ERR_CANNOT_RENAME_PARTIAL

    public static final int ERR_CANNOT_RENAME_PARTIAL

    ERR_CANNOT_RESUME

    public static final int ERR_CANNOT_RESUME

    ERR_CANNOT_SYMLINK

    public static final int ERR_CANNOT_SYMLINK

    ERR_CONNECTION_BROKEN

    public static final int ERR_CONNECTION_BROKEN

    ERR_COULD_NOT_ACCEPT

    public static final int ERR_COULD_NOT_ACCEPT

    ERR_COULD_NOT_AUTHENTICATE

    public static final int ERR_COULD_NOT_AUTHENTICATE

    ERR_COULD_NOT_BIND

    public static final int ERR_COULD_NOT_BIND

    ERR_COULD_NOT_CLOSEDIR

    public static final int ERR_COULD_NOT_CLOSEDIR

    ERR_COULD_NOT_CONNECT

    public static final int ERR_COULD_NOT_CONNECT

    ERR_COULD_NOT_CREATE_SOCKET

    public static final int ERR_COULD_NOT_CREATE_SOCKET

    ERR_COULD_NOT_LISTEN

    public static final int ERR_COULD_NOT_LISTEN

    ERR_COULD_NOT_LOGIN

    public static final int ERR_COULD_NOT_LOGIN

    ERR_COULD_NOT_MKDIR

    public static final int ERR_COULD_NOT_MKDIR

    ERR_COULD_NOT_MOUNT

    public static final int ERR_COULD_NOT_MOUNT

    ERR_COULD_NOT_READ

    public static final int ERR_COULD_NOT_READ

    ERR_COULD_NOT_RMDIR

    public static final int ERR_COULD_NOT_RMDIR

    ERR_COULD_NOT_STAT

    public static final int ERR_COULD_NOT_STAT

    ERR_COULD_NOT_UNMOUNT

    public static final int ERR_COULD_NOT_UNMOUNT

    ERR_COULD_NOT_WRITE

    public static final int ERR_COULD_NOT_WRITE

    ERR_CYCLIC_COPY

    public static final int ERR_CYCLIC_COPY

    ERR_CYCLIC_LINK

    public static final int ERR_CYCLIC_LINK

    ERR_DIR_ALREADY_EXIST

    public static final int ERR_DIR_ALREADY_EXIST

    ERR_DISK_FULL

    public static final int ERR_DISK_FULL

    ERR_DOES_NOT_EXIST

    public static final int ERR_DOES_NOT_EXIST

    ERR_FILE_ALREADY_EXIST

    public static final int ERR_FILE_ALREADY_EXIST

    ERR_IDENTICAL_FILES

    public static final int ERR_IDENTICAL_FILES

    ERR_INTERNAL

    public static final int ERR_INTERNAL

    ERR_INTERNAL_SERVER

    public static final int ERR_INTERNAL_SERVER

    ERR_IS_DIRECTORY

    public static final int ERR_IS_DIRECTORY

    ERR_IS_FILE

    public static final int ERR_IS_FILE

    ERR_MALFORMED_URL

    public static final int ERR_MALFORMED_URL

    ERR_NEED_PASSWD

    public static final int ERR_NEED_PASSWD

    ERR_NOT_FILTER_PROTOCOL

    public static final int ERR_NOT_FILTER_PROTOCOL

    ERR_NO_CONTENT

    public static final int ERR_NO_CONTENT

    ERR_NO_SOURCE_PROTOCOL

    public static final int ERR_NO_SOURCE_PROTOCOL

    ERR_OUT_OF_MEMORY

    public static final int ERR_OUT_OF_MEMORY

    ERR_POST_DENIED

    public static final int ERR_POST_DENIED

    ERR_PROTOCOL_IS_NOT_A_FILESYSTEM

    public static final int ERR_PROTOCOL_IS_NOT_A_FILESYSTEM

    ERR_SERVER_TIMEOUT

    public static final int ERR_SERVER_TIMEOUT

    ERR_SERVICE_NOT_AVAILABLE

    public static final int ERR_SERVICE_NOT_AVAILABLE

    ERR_SLAVE_DEFINED

    public static final int ERR_SLAVE_DEFINED

    ERR_SLAVE_DIED

    public static final int ERR_SLAVE_DIED

    ERR_UNKNOWN

    public static final int ERR_UNKNOWN

    ERR_UNKNOWN_HOST

    public static final int ERR_UNKNOWN_HOST

    ERR_UNKNOWN_INTERRUPT

    public static final int ERR_UNKNOWN_INTERRUPT

    ERR_UNKNOWN_PROXY_HOST

    public static final int ERR_UNKNOWN_PROXY_HOST

    ERR_UNSUPPORTED_ACTION

    public static final int ERR_UNSUPPORTED_ACTION

    ERR_UNSUPPORTED_PROTOCOL

    public static final int ERR_UNSUPPORTED_PROTOCOL

    ERR_UPGRADE_REQUIRED

    public static final int ERR_UPGRADE_REQUIRED

    ERR_USER_CANCELED

    public static final int ERR_USER_CANCELED

    ERR_WRITE_ACCESS_DENIED

    public static final int ERR_WRITE_ACCESS_DENIED

    HTTP_DELETE

    public static final int HTTP_DELETE

    HTTP_GET

    public static final int HTTP_GET
    HTTP / DAV method * @short HTTP / DAV method

    HTTP_HEAD

    public static final int HTTP_HEAD

    HTTP_OPTIONS

    public static final int HTTP_OPTIONS

    HTTP_POST

    public static final int HTTP_POST

    HTTP_PUT

    public static final int HTTP_PUT

    HTTP_UNKNOWN

    public static final int HTTP_UNKNOWN

    INF_ERROR_PAGE

    public static final int INF_ERROR_PAGE

    INF_GETTING_FILE

    public static final int INF_GETTING_FILE

    INF_INFOMESSAGE

    public static final int INF_INFOMESSAGE

    INF_MESSAGEBOX

    public static final int INF_MESSAGEBOX

    INF_META_DATA

    public static final int INF_META_DATA

    INF_MIME_TYPE

    public static final int INF_MIME_TYPE

    INF_NEED_PASSWD

    public static final int INF_NEED_PASSWD

    INF_NETWORK_STATUS

    public static final int INF_NETWORK_STATUS

    INF_PROCESSED_SIZE

    public static final int INF_PROCESSED_SIZE

    INF_REDIRECTION

    public static final int INF_REDIRECTION

    INF_SPEED

    public static final int INF_SPEED

    INF_TOTAL_SIZE

    public static final int INF_TOTAL_SIZE
    Identifiers for KIO informational messages.

    UNKNOWN: Identifiers for KIO informational messages.

    INF_WARNING

    public static final int INF_WARNING

    LIST

    public static final int LIST

    MSG_AUTH_KEY

    public static final int MSG_AUTH_KEY

    MSG_CANRESUME

    public static final int MSG_CANRESUME

    MSG_CONNECTED

    public static final int MSG_CONNECTED

    MSG_DATA

    public static final int MSG_DATA
    Identifiers for KIO data messages.

    UNKNOWN: Identifiers for KIO data messages.

    MSG_DATA_REQ

    public static final int MSG_DATA_REQ

    MSG_DEL_AUTH_KEY

    public static final int MSG_DEL_AUTH_KEY

    MSG_ERROR

    public static final int MSG_ERROR

    MSG_FINISHED

    public static final int MSG_FINISHED

    MSG_LIST_ENTRIES

    public static final int MSG_LIST_ENTRIES

    MSG_NEED_SUBURL_DATA

    public static final int MSG_NEED_SUBURL_DATA

    MSG_NET_DROP

    public static final int MSG_NET_DROP

    MSG_NET_REQUEST

    public static final int MSG_NET_REQUEST

    MSG_RENAMED

    public static final int MSG_RENAMED

    MSG_RESUME

    public static final int MSG_RESUME

    MSG_SLAVE_ACK

    public static final int MSG_SLAVE_ACK

    MSG_SLAVE_STATUS

    public static final int MSG_SLAVE_STATUS

    MSG_STAT_ENTRY

    public static final int MSG_STAT_ENTRY

    M_MULTI

    public static final int M_MULTI

    M_NORENAME

    public static final int M_NORENAME

    M_OVERWRITE

    public static final int M_OVERWRITE

    M_OVERWRITE_ITSELF

    public static final int M_OVERWRITE_ITSELF

    M_RESUME

    public static final int M_RESUME

    M_SINGLE

    public static final int M_SINGLE

    M_SKIP

    public static final int M_SKIP

    R_AUTO_SKIP

    public static final int R_AUTO_SKIP

    R_CANCEL

    public static final int R_CANCEL

    R_OVERWRITE

    public static final int R_OVERWRITE

    R_OVERWRITE_ALL

    public static final int R_OVERWRITE_ALL

    R_RENAME

    public static final int R_RENAME

    R_RESUME

    public static final int R_RESUME
    The result of open_RenameDlg().

    UNKNOWN: The result of open_RenameDlg().

    R_RESUME_ALL

    public static final int R_RESUME_ALL

    R_SKIP

    public static final int R_SKIP

    STATUSBAR

    public static final int STATUSBAR

    SupportsChmod

    public static final int SupportsChmod

    SupportsChown

    public static final int SupportsChown

    SupportsSymlinks

    public static final int SupportsSymlinks

    SupportsUTime

    public static final int SupportsUTime

    S_AUTO_SKIP

    public static final int S_AUTO_SKIP

    S_CANCEL

    public static final int S_CANCEL

    S_SKIP

    public static final int S_SKIP

    UDS_ACCESS

    public static final int UDS_ACCESS

    UDS_ACCESS_TIME

    public static final int UDS_ACCESS_TIME

    UDS_ACL_STRING

    public static final int UDS_ACL_STRING

    UDS_CREATION_TIME

    public static final int UDS_CREATION_TIME

    UDS_DEFAULT_ACL_STRING

    public static final int UDS_DEFAULT_ACL_STRING

    UDS_EXTENDED_ACL

    public static final int UDS_EXTENDED_ACL

    UDS_EXTRA

    public static final int UDS_EXTRA

    UDS_FILE_TYPE

    public static final int UDS_FILE_TYPE

    UDS_GROUP

    public static final int UDS_GROUP

    UDS_GUESSED_MIME_TYPE

    public static final int UDS_GUESSED_MIME_TYPE

    UDS_HIDDEN

    public static final int UDS_HIDDEN

    UDS_ICON_NAME

    public static final int UDS_ICON_NAME

    UDS_LINK_DEST

    public static final int UDS_LINK_DEST

    UDS_LOCAL_PATH

    public static final int UDS_LOCAL_PATH

    UDS_LONG

    public static final int UDS_LONG

    UDS_MIME_TYPE

    public static final int UDS_MIME_TYPE

    UDS_MODIFICATION_TIME

    public static final int UDS_MODIFICATION_TIME

    UDS_NAME

    public static final int UDS_NAME

    UDS_SIZE

    public static final int UDS_SIZE

    UDS_SIZE_LARGE

    public static final int UDS_SIZE_LARGE

    UDS_STRING

    public static final int UDS_STRING
    Constants used to specify the type of a KUDSAtom.

    UNKNOWN: Constants used to specify the type of a KUDSAtom.

    UDS_TIME

    public static final int UDS_TIME

    UDS_URL

    public static final int UDS_URL

    UDS_USER

    public static final int UDS_USER

    UDS_XML_PROPERTIES

    public static final int UDS_XML_PROPERTIES

    Method Detail

    buildErrorString

    public static String buildErrorString(int errorCode, String 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

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

    chmod

    public static SimpleJob chmod(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.

    UNKNOWN: Changes permissions on a file or directory.

    convertSeconds

    public static String convertSeconds(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

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

    convertSize

    public static String convertSize(long 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

    UNKNOWN: Converts size from bytes to the string representation.

    convertSizeFromKB

    public static String convertSizeFromKB(long 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

    UNKNOWN: Converts size from kilo-bytes to the string representation.

    convertSizeWithBytes

    public static String convertSizeWithBytes(long 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

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

    copy

    public static CopyJob copy(KURL src, KURL dest, boolean showProgressInfo)
    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: KIO

    UNKNOWN: 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).

    copy

    public static CopyJob copy(KURL src, KURL dest)

    copy

    public static CopyJob copy(ArrayList src, KURL dest, boolean showProgressInfo)
    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

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

    copy

    public static CopyJob copy(ArrayList src, KURL dest)

    copyAs

    public static CopyJob copyAs(KURL src, KURL dest, boolean showProgressInfo)
    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

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

    copyAs

    public static CopyJob copyAs(KURL src, KURL dest)

    davPropFind

    public static DavJob davPropFind(KURL url, QDomDocument properties, String depth, boolean showProgressInfo)
    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

    UNKNOWN: Creates a new DavJob that issues a PROPFIND command.

    davPropFind

    public static DavJob davPropFind(KURL url, QDomDocument properties, String depth)

    davPropPatch

    public static DavJob davPropPatch(KURL url, QDomDocument properties, boolean showProgressInfo)
    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

    UNKNOWN: Creates a new DavJob that issues a PROPPATCH command.

    davPropPatch

    public static DavJob davPropPatch(KURL url, QDomDocument properties)

    davSearch

    public static DavJob davSearch(KURL url, String nsURI, String qName, String query, boolean showProgressInfo)
    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

    UNKNOWN: Creates a new DavJob that issues a SEARCH command.

    davSearch

    public static DavJob davSearch(KURL url, String nsURI, String qName, String query)

    decodeFileName

    public static String decodeFileName(String str)
    Decodes (from the filename to the text displayed) This translates %2[fF] into / and %% into %

    Parameters: str the file name to decode

    Returns: the decoded file name

    UNKNOWN: Decodes (from the filename to the text displayed) This translates %2[fF] into / and %% into %

    del

    public static DeleteJob del(KURL src, boolean shred, boolean showProgressInfo)
    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

    UNKNOWN: Delete a file or directory.

    del

    public static DeleteJob del(KURL src, boolean shred)

    del

    public static DeleteJob del(KURL src)

    del

    public static DeleteJob del(ArrayList src, boolean shred, boolean showProgressInfo)
    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

    UNKNOWN: Deletes a list of files or directories.

    del

    public static DeleteJob del(ArrayList src, boolean shred)

    del

    public static DeleteJob del(ArrayList src)

    encodeFileName

    public static String encodeFileName(String str)
    Encodes (from the text displayed to the real filename) This translates % into %% and / into %2f Used by KIO.link, for instance.

    Parameters: str the file name to encode

    Returns: the encoded file name

    UNKNOWN: Encodes (from the text displayed to the real filename) This translates % into %% and / into %2f Used by KIO.link, for instance.

    fileMetaInfo

    public static MetaInfoJob fileMetaInfo(ArrayList items)
    Retrieves meta information for the given items.

    Parameters: items files to get metainfo for

    Returns: the MetaInfoJob to retrieve the items

    UNKNOWN: Retrieves meta information for the given items.

    filePreview

    public static PreviewJob filePreview(ArrayList items, int width, int height, int iconSize, int iconAlpha, boolean scale, boolean save, String[] enabledPlugins)
    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

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

    filePreview

    public static PreviewJob filePreview(ArrayList items, int width, int height, int iconSize, int iconAlpha, boolean scale, boolean save)

    filePreview

    public static PreviewJob filePreview(ArrayList items, int width, int height, int iconSize, int iconAlpha, boolean scale)

    filePreview

    public static PreviewJob filePreview(ArrayList items, int width, int height, int iconSize, int iconAlpha)

    filePreview

    public static PreviewJob filePreview(ArrayList items, int width, int height, int iconSize)

    filePreview

    public static PreviewJob filePreview(ArrayList items, int width, int height)

    filePreview

    public static PreviewJob filePreview(ArrayList items, int width)

    file_copy

    public static FileCopyJob file_copy(KURL src, KURL dest, int permissions, boolean overwrite, boolean resume, boolean showProgressInfo)
    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.

    UNKNOWN: Copy a single file.

    file_copy

    public static FileCopyJob file_copy(KURL src, KURL dest, int permissions, boolean overwrite, boolean resume)

    file_copy

    public static FileCopyJob file_copy(KURL src, KURL dest, int permissions, boolean overwrite)

    file_copy

    public static FileCopyJob file_copy(KURL src, KURL dest, int permissions)

    file_copy

    public static FileCopyJob file_copy(KURL src, KURL dest)

    file_delete

    public static SimpleJob file_delete(KURL src, boolean showProgressInfo)
    Delete a single file.

    Parameters: src File to delete. showProgressInfo true to show progress information

    Returns: the job handling the operation.

    UNKNOWN: Delete a single file.

    file_delete

    public static SimpleJob file_delete(KURL src)

    file_move

    public static FileCopyJob file_move(KURL src, KURL dest, int permissions, boolean overwrite, boolean resume, boolean showProgressInfo)
    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.

    UNKNOWN: Move a single file.

    file_move

    public static FileCopyJob file_move(KURL src, KURL dest, int permissions, boolean overwrite, boolean resume)

    file_move

    public static FileCopyJob file_move(KURL src, KURL dest, int permissions, boolean overwrite)

    file_move

    public static FileCopyJob file_move(KURL src, KURL dest, int permissions)

    file_move

    public static FileCopyJob file_move(KURL src, KURL dest)

    findDeviceMountPoint

    public static String findDeviceMountPoint(String device)
    Returns the mount point where device is mounted right now. This means, it has to be mounted, not just defined in fstab.

    UNKNOWN: Returns the mount point where device is mounted right now.

    findPathMountPoint

    public static String findPathMountPoint(String 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

    UNKNOWN: Returns the mount point on which resides filename.

    get

    public static TransferJob get(KURL url, boolean reload, boolean showProgressInfo)
    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.

    UNKNOWN: Get (a.

    get

    public static TransferJob get(KURL url, boolean reload)

    get

    public static TransferJob get(KURL url)

    getCacheControlString

    public static String getCacheControlString(int cacheControl)
    Returns a string representation of the given cache control method.

    Parameters: cacheControl the cache control method

    Returns: the string representation

    See Also: KIO

    UNKNOWN: Returns a string representation of the given cache control method.

    http_post

    public static TransferJob http_post(KURL url, byte[] postData, boolean showProgressInfo)
    HTTP POST (for form data). Example:
    		    job = KIO.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.

    UNKNOWN: HTTP POST (for form data).

    http_post

    public static TransferJob http_post(KURL url, byte[] postData)

    http_update_cache

    public static SimpleJob http_update_cache(KURL url, boolean no_cache, int 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.

    UNKNOWN: HTTP cache update

    isClipboardEmpty

    public static boolean isClipboardEmpty()
    Checks whether the clipboard contains any URLs.

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

    UNKNOWN: Checks whether the clipboard contains any URLs.

    itemsSummaryString

    public static String itemsSummaryString(int items, int files, int dirs, long size, boolean 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

    UNKNOWN: Helper for showing information about a set of files and directories

    link

    public static CopyJob link(KURL src, KURL destDir, boolean showProgressInfo)
    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

    UNKNOWN: Create a link.

    link

    public static CopyJob link(KURL src, KURL destDir)

    link

    public static CopyJob link(ArrayList src, KURL destDir, boolean showProgressInfo)
    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: KIO

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

    link

    public static CopyJob link(ArrayList src, KURL destDir)

    linkAs

    public static CopyJob linkAs(KURL src, KURL dest, boolean showProgressInfo)
    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: KIO KIO

    UNKNOWN: Create a link.

    linkAs

    public static CopyJob linkAs(KURL src, KURL dest)

    listDir

    public static ListJob listDir(KURL url, boolean showProgressInfo, boolean includeHidden)
    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.

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

    listDir

    public static ListJob listDir(KURL url, boolean showProgressInfo)

    listDir

    public static ListJob listDir(KURL url)

    listRecursive

    public static ListJob listRecursive(KURL url, boolean showProgressInfo, boolean includeHidden)
    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.

    UNKNOWN: The same as the previous method, but recurses subdirectories.

    listRecursive

    public static ListJob listRecursive(KURL url, boolean showProgressInfo)

    listRecursive

    public static ListJob listRecursive(KURL url)

    manually_mounted

    public static boolean manually_mounted(String 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

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

    mimetype

    public static MimetypeJob mimetype(KURL url, boolean showProgressInfo)
    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.

    UNKNOWN: Find mimetype for one file or directory.

    mimetype

    public static MimetypeJob mimetype(KURL url)

    mkdir

    public static SimpleJob mkdir(KURL url, int permissions)
    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.

    UNKNOWN: Creates a single directory.

    mkdir

    public static SimpleJob mkdir(KURL url)

    mount

    public static SimpleJob mount(boolean ro, String fstype, String dev, String point, boolean showProgressInfo)
    Mount filesystem. Special job for kio_file.

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

    Returns: the job handling the operation.

    UNKNOWN: Mount filesystem.

    mount

    public static SimpleJob mount(boolean ro, String fstype, String dev, String point)

    move

    public static CopyJob move(KURL src, KURL dest, boolean showProgressInfo)
    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: KIO KIO

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

    move

    public static CopyJob move(KURL src, KURL dest)

    move

    public static CopyJob move(ArrayList src, KURL dest, boolean showProgressInfo)
    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: KIO

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

    move

    public static CopyJob move(ArrayList src, KURL dest)

    moveAs

    public static CopyJob moveAs(KURL src, KURL dest, boolean showProgressInfo)
    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: KIO

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

    moveAs

    public static CopyJob moveAs(KURL src, KURL dest)

    number

    public static String number(long size)
    Converts a size to a string representation Not unlike String.number(...)

    Parameters: size size in bytes

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

    UNKNOWN: Converts a size to a string representation Not unlike String.number(.

    open_RenameDlg

    public static int open_RenameDlg(String caption, String src, String dest, int mode, StringBuffer newDestPath, long sizeSrc, long sizeDest, int ctimeSrc, int ctimeDest, int mtimeSrc, int mtimeDest)
  • RenameDlg related Functions
  • KIO Construct a modal, parent-less "rename" dialog, and return a result code, as well as the new dest. Much easier to use than the class RenameDlg directly.

    Parameters: caption the caption for the dialog box src the URL of the file/dir we're trying to copy, as it's part of the text message dest the URL of the destination file/dir, i.e. the one that already exists mode parameters for the dialog (which buttons to show...), see RenameDlg_Mode newDest the new destination path, valid if R_RENAME was returned. sizeSrc size of source file sizeDest size of destination file ctimeSrc creation time of source file ctimeDest creation time of destination file mtimeSrc modification time of source file mtimeDest modification time of destination file

    Returns: the result

    UNKNOWN:

  • RenameDlg related Functions
  • KIO Construct a modal, parent-less "rename" dialog, and return a result code, as well as the new dest.

    open_RenameDlg

    public static int open_RenameDlg(String caption, String src, String dest, int mode, StringBuffer newDestPath, long sizeSrc, long sizeDest, int ctimeSrc, int ctimeDest, int mtimeSrc)

    open_RenameDlg

    public static int open_RenameDlg(String caption, String src, String dest, int mode, StringBuffer newDestPath, long sizeSrc, long sizeDest, int ctimeSrc, int ctimeDest)

    open_RenameDlg

    public static int open_RenameDlg(String caption, String src, String dest, int mode, StringBuffer newDestPath, long sizeSrc, long sizeDest, int ctimeSrc)

    open_RenameDlg

    public static int open_RenameDlg(String caption, String src, String dest, int mode, StringBuffer newDestPath, long sizeSrc, long sizeDest)

    open_RenameDlg

    public static int open_RenameDlg(String caption, String src, String dest, int mode, StringBuffer newDestPath, long sizeSrc)

    open_RenameDlg

    public static int open_RenameDlg(String caption, String src, String dest, int mode, StringBuffer newDestPath)

    open_SkipDlg

    public static int open_SkipDlg(boolean _multi, String _error_text)

    open_SkipDlg

    public static int open_SkipDlg(boolean _multi)

    op_read

    public static QDataStream op_read(QDataStream s, AuthInfo a)

    op_write

    public static QDataStream op_write(QDataStream s, AuthInfo a)

    parseCacheControl

    public static int parseCacheControl(String cacheControl)
    Parses the string representation of the cache control option.

    Parameters: cacheControl the string representation

    Returns: the cache control value

    See Also: KIO

    UNKNOWN: Parses the string representation of the cache control option.

    pasteActionText

    public static String 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 KAction.setText, or an empty string if pasting isn't possible right now.

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

    pasteClipboard

    public static Job pasteClipboard(KURL destURL, boolean move)
    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: KIO

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

    pasteClipboard

    public static Job pasteClipboard(KURL destURL)

    pasteData

    public static void pasteData(KURL destURL, byte[] 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: KIO

    UNKNOWN: Pastes the given data to the given destination URL.

    pasteDataAsync

    public static CopyJob pasteDataAsync(KURL destURL, byte[] data)
    Pastes the given data to the given destination URL. Note that this method requires the caller to have chosen the byte[] 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: KIO

    UNKNOWN: Pastes the given data to the given destination URL.

    pasteDataAsync

    public static CopyJob pasteDataAsync(KURL destURL, byte[] data, String dialogText)
    Pastes the given data to the given destination URL. Note that this method requires the caller to have chosen the byte[] 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: KIO

    UNKNOWN: Pastes the given data to the given destination URL.

    pasteMimeSource

    public static CopyJob pasteMimeSource(QMimeSourceInterface data, KURL destURL, String dialogText, QWidget widget, boolean clipboard)
    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 QMimeSource (e.g. a QDropEvent) 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 QMimeSource comes from QClipboard. If you use pasteClipboard for that case, you never have to worry about this parameter.

    See Also: KIO

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

    pasteMimeSource

    public static CopyJob pasteMimeSource(QMimeSourceInterface data, KURL destURL, String dialogText, QWidget widget)

    probably_slow_mounted

    public static boolean probably_slow_mounted(String 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

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

    put

    public static TransferJob put(KURL url, int permissions, boolean overwrite, boolean resume, boolean showProgressInfo)
    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: KIO

    UNKNOWN: Put (a.

    put

    public static TransferJob put(KURL url, int permissions, boolean overwrite, boolean resume)

    rawErrorDetail

    public static byte[] rawErrorDetail(int errorCode, String errorText, KURL reqUrl, int method)
    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

  • String errorName - the name of the error
  • String techName - if not null, the more technical name of the error
  • String description - a description of the error
  • ArrayList causes - a list of possible causes of the error
  • ArrayList solutions - a liso of solutions for the error
  • @return the following data:

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

    rawErrorDetail

    public static byte[] rawErrorDetail(int errorCode, String errorText, KURL reqUrl)

    rawErrorDetail

    public static byte[] rawErrorDetail(int errorCode, String errorText)

    rename

    public static SimpleJob rename(KURL src, KURL dest, boolean 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.

    UNKNOWN: Rename a file or directory.

    rmdir

    public static SimpleJob rmdir(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.

    UNKNOWN: Removes a single directory.

    special

    public static SimpleJob special(KURL url, byte[] data, boolean showProgressInfo)
    Execute any command that is specific to one slave (protocol). Examples are : HTTP POST, mount and unmount (kio_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.

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

    special

    public static SimpleJob special(KURL url, byte[] data)

    stat

    public static StatJob stat(KURL url, boolean showProgressInfo)
    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.

    UNKNOWN: Find all details for one file or directory.

    stat

    public static StatJob stat(KURL url)

    stat

    public static StatJob stat(KURL url, boolean sideIsSource, short details, boolean showProgressInfo)
    Find all details for one file or directory. This version of the call includes two additional booleaneans, 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 kioslave 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.

    UNKNOWN: Find all details for one file or directory.

    stat

    public static StatJob stat(KURL url, boolean sideIsSource, short details)

    storedGet

    public static StoredTransferJob storedGet(KURL url, boolean reload, boolean showProgressInfo)
    Get (a.k.a. read), into a single byte[].

    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.

    See Also: StoredTransferJob

    UNKNOWN: Get (a.

    storedGet

    public static StoredTransferJob storedGet(KURL url, boolean reload)

    storedGet

    public static StoredTransferJob storedGet(KURL url)

    storedPut

    public static StoredTransferJob storedPut(byte[] arr, KURL url, int permissions, boolean overwrite, boolean resume, boolean showProgressInfo)
    Put (a.k.a. write) data from a single byte[].

    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.

    See Also: StoredTransferJob

    UNKNOWN: Put (a.

    storedPut

    public static StoredTransferJob storedPut(byte[] arr, KURL url, int permissions, boolean overwrite, boolean resume)

    symlink

    public static SimpleJob symlink(String target, KURL dest, boolean overwrite, boolean showProgressInfo)
    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 KIO.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.

    UNKNOWN: Create or move a symlink.

    symlink

    public static SimpleJob symlink(String target, KURL dest, boolean overwrite)

    testFileSystemFlag

    public static boolean testFileSystemFlag(String filename, int 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 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)
  • Returns: true if the filesystem has that flag, false if not (or some error occurred)

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

    trash

    public static CopyJob trash(KURL src, boolean showProgressInfo)
    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

    UNKNOWN: Trash a file or directory.

    trash

    public static CopyJob trash(KURL src)

    trash

    public static CopyJob trash(ArrayList src, boolean showProgressInfo)
    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

    UNKNOWN: Trash a list of files or directories.

    trash

    public static CopyJob trash(ArrayList src)

    unmount

    public static SimpleJob unmount(String point, boolean showProgressInfo)
    Unmount filesystem. Special job for kio_file.

    Parameters: point Point to unmount. showProgressInfo true to show progress information

    Returns: the job handling the operation.

    UNKNOWN: Unmount filesystem.

    unmount

    public static SimpleJob unmount(String point)

    unsupportedActionErrorString

    public static String unsupportedActionErrorString(String 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: KIO Command

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