|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kde.koala.KIO
public class KIO
Constructor Summary | |
---|---|
KIO()
|
Method Summary | |
---|---|
static java.lang.String |
buildErrorString(int errorCode,
java.lang.String errorText)
Returns a translated error message for errorCode using the
additional error information provided by errorText. |
static SimpleJob |
chmod(KURL url,
int permissions)
Changes permissions on a file or directory. |
static java.lang.String |
convertSeconds(int seconds)
Convert seconds to a string representing number of days, hours, minutes and seconds |
static java.lang.String |
convertSize(long size)
Converts size from bytes to the string representation. |
static java.lang.String |
convertSizeFromKB(long kbSize)
Converts size from kilo-bytes to the string representation. |
static java.lang.String |
convertSizeWithBytes(long size)
Converts size from bytes to a string representation with includes
the size in bytes. |
static CopyJob |
copy(java.util.ArrayList src,
KURL dest)
|
static CopyJob |
copy(java.util.ArrayList src,
KURL dest,
boolean showProgressInfo)
Copy a list of file/dirs src into a destination directory dest. |
static CopyJob |
copy(KURL src,
KURL dest)
|
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). |
static CopyJob |
copyAs(KURL src,
KURL dest)
|
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. |
static DavJob |
davPropFind(KURL url,
org.kde.qt.QDomDocument properties,
java.lang.String depth)
|
static DavJob |
davPropFind(KURL url,
org.kde.qt.QDomDocument properties,
java.lang.String depth,
boolean showProgressInfo)
Creates a new DavJob that issues a PROPFIND command. |
static DavJob |
davPropPatch(KURL url,
org.kde.qt.QDomDocument properties)
|
static DavJob |
davPropPatch(KURL url,
org.kde.qt.QDomDocument properties,
boolean showProgressInfo)
Creates a new DavJob that issues a PROPPATCH command. |
static DavJob |
davSearch(KURL url,
java.lang.String nsURI,
java.lang.String qName,
java.lang.String query)
|
static DavJob |
davSearch(KURL url,
java.lang.String nsURI,
java.lang.String qName,
java.lang.String query,
boolean showProgressInfo)
Creates a new DavJob that issues a SEARCH command. |
static java.lang.String |
decodeFileName(java.lang.String str)
Decodes (from the filename to the text displayed) This translates %2[fF] into / and %% into % |
static DeleteJob |
del(java.util.ArrayList src)
|
static DeleteJob |
del(java.util.ArrayList src,
boolean shred)
|
static DeleteJob |
del(java.util.ArrayList src,
boolean shred,
boolean showProgressInfo)
Deletes a list of files or directories. |
static DeleteJob |
del(KURL src)
|
static DeleteJob |
del(KURL src,
boolean shred)
|
static DeleteJob |
del(KURL src,
boolean shred,
boolean showProgressInfo)
Delete a file or directory. |
static java.lang.String |
encodeFileName(java.lang.String str)
Encodes (from the text displayed to the real filename) This translates % into %% and / into %2f Used by KIO.link, for instance. |
static FileCopyJob |
file_copy(KURL src,
KURL dest)
|
static FileCopyJob |
file_copy(KURL src,
KURL dest,
int permissions)
|
static FileCopyJob |
file_copy(KURL src,
KURL dest,
int permissions,
boolean overwrite)
|
static FileCopyJob |
file_copy(KURL src,
KURL dest,
int permissions,
boolean overwrite,
boolean resume)
|
static FileCopyJob |
file_copy(KURL src,
KURL dest,
int permissions,
boolean overwrite,
boolean resume,
boolean showProgressInfo)
Copy a single file. |
static SimpleJob |
file_delete(KURL src)
|
static SimpleJob |
file_delete(KURL src,
boolean showProgressInfo)
Delete a single file. |
static FileCopyJob |
file_move(KURL src,
KURL dest)
|
static FileCopyJob |
file_move(KURL src,
KURL dest,
int permissions)
|
static FileCopyJob |
file_move(KURL src,
KURL dest,
int permissions,
boolean overwrite)
|
static FileCopyJob |
file_move(KURL src,
KURL dest,
int permissions,
boolean overwrite,
boolean resume)
|
static FileCopyJob |
file_move(KURL src,
KURL dest,
int permissions,
boolean overwrite,
boolean resume,
boolean showProgressInfo)
Move a single file. |
static MetaInfoJob |
fileMetaInfo(java.util.ArrayList items)
Retrieves meta information for the given items. |
static PreviewJob |
filePreview(java.util.ArrayList items,
int width)
|
static PreviewJob |
filePreview(java.util.ArrayList items,
int width,
int height)
|
static PreviewJob |
filePreview(java.util.ArrayList items,
int width,
int height,
int iconSize)
|
static PreviewJob |
filePreview(java.util.ArrayList items,
int width,
int height,
int iconSize,
int iconAlpha)
|
static PreviewJob |
filePreview(java.util.ArrayList items,
int width,
int height,
int iconSize,
int iconAlpha,
boolean scale)
|
static PreviewJob |
filePreview(java.util.ArrayList items,
int width,
int height,
int iconSize,
int iconAlpha,
boolean scale,
boolean save)
|
static PreviewJob |
filePreview(java.util.ArrayList items,
int width,
int height,
int iconSize,
int iconAlpha,
boolean scale,
boolean save,
java.lang.String[] enabledPlugins)
Creates a PreviewJob to generate or retrieve a preview image for the given URL. |
static java.lang.String |
findDeviceMountPoint(java.lang.String device)
Returns the mount point where device is mounted
right now. |
static java.lang.String |
findPathMountPoint(java.lang.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 TransferJob |
get(KURL url)
|
static TransferJob |
get(KURL url,
boolean reload)
|
static TransferJob |
get(KURL url,
boolean reload,
boolean showProgressInfo)
Get (a.k.a. |
static java.lang.String |
getCacheControlString(int cacheControl)
Returns a string representation of the given cache control method. |
static TransferJob |
http_post(KURL url,
byte[] postData)
|
static TransferJob |
http_post(KURL url,
byte[] postData,
boolean showProgressInfo)
HTTP POST (for form data). |
static SimpleJob |
http_update_cache(KURL url,
boolean no_cache,
int expireDate)
HTTP cache update |
static boolean |
isClipboardEmpty()
Checks whether the clipboard contains any URLs. |
static java.lang.String |
itemsSummaryString(int items,
int files,
int dirs,
long size,
boolean showSize)
Helper for showing information about a set of files and directories |
static CopyJob |
link(java.util.ArrayList src,
KURL destDir)
|
static CopyJob |
link(java.util.ArrayList src,
KURL destDir,
boolean showProgressInfo)
Create several links If the protocols and hosts are the same, a Unix symlink will be created. |
static CopyJob |
link(KURL src,
KURL destDir)
|
static CopyJob |
link(KURL src,
KURL destDir,
boolean showProgressInfo)
Create a link. |
static CopyJob |
linkAs(KURL src,
KURL dest)
|
static CopyJob |
linkAs(KURL src,
KURL dest,
boolean showProgressInfo)
Create a link. |
static ListJob |
listDir(KURL url)
|
static ListJob |
listDir(KURL url,
boolean showProgressInfo)
|
static ListJob |
listDir(KURL url,
boolean showProgressInfo,
boolean includeHidden)
List the contents of url , which is assumed to be a directory. |
static ListJob |
listRecursive(KURL url)
|
static ListJob |
listRecursive(KURL url,
boolean showProgressInfo)
|
static ListJob |
listRecursive(KURL url,
boolean showProgressInfo,
boolean includeHidden)
The same as the previous method, but recurses subdirectories. |
static boolean |
manually_mounted(java.lang.String filename)
Checks if the path belongs to a filesystem that is manually mounted. |
static MimetypeJob |
mimetype(KURL url)
|
static MimetypeJob |
mimetype(KURL url,
boolean showProgressInfo)
Find mimetype for one file or directory. |
static SimpleJob |
mkdir(KURL url)
|
static SimpleJob |
mkdir(KURL url,
int permissions)
Creates a single directory. |
static SimpleJob |
mount(boolean ro,
java.lang.String fstype,
java.lang.String dev,
java.lang.String point)
|
static SimpleJob |
mount(boolean ro,
java.lang.String fstype,
java.lang.String dev,
java.lang.String point,
boolean showProgressInfo)
Mount filesystem. |
static CopyJob |
move(java.util.ArrayList src,
KURL dest)
|
static CopyJob |
move(java.util.ArrayList src,
KURL dest,
boolean showProgressInfo)
Moves a list of files or directories src to the given destination dest. |
static CopyJob |
move(KURL src,
KURL dest)
|
static CopyJob |
move(KURL src,
KURL dest,
boolean showProgressInfo)
Moves a file or directory src to the given destination dest. |
static CopyJob |
moveAs(KURL src,
KURL dest)
|
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. |
static java.lang.String |
number(long size)
Converts a size to a string representation Not unlike String.number(...) |
static org.kde.qt.QDataStream |
op_read(org.kde.qt.QDataStream s,
AuthInfo a)
|
static org.kde.qt.QDataStream |
op_write(org.kde.qt.QDataStream s,
AuthInfo a)
|
static int |
open_RenameDlg(java.lang.String caption,
java.lang.String src,
java.lang.String dest,
int mode,
java.lang.StringBuffer newDestPath)
|
static int |
open_RenameDlg(java.lang.String caption,
java.lang.String src,
java.lang.String dest,
int mode,
java.lang.StringBuffer newDestPath,
long sizeSrc)
|
static int |
open_RenameDlg(java.lang.String caption,
java.lang.String src,
java.lang.String dest,
int mode,
java.lang.StringBuffer newDestPath,
long sizeSrc,
long sizeDest)
|
static int |
open_RenameDlg(java.lang.String caption,
java.lang.String src,
java.lang.String dest,
int mode,
java.lang.StringBuffer newDestPath,
long sizeSrc,
long sizeDest,
int ctimeSrc)
|
static int |
open_RenameDlg(java.lang.String caption,
java.lang.String src,
java.lang.String dest,
int mode,
java.lang.StringBuffer newDestPath,
long sizeSrc,
long sizeDest,
int ctimeSrc,
int ctimeDest)
|
static int |
open_RenameDlg(java.lang.String caption,
java.lang.String src,
java.lang.String dest,
int mode,
java.lang.StringBuffer newDestPath,
long sizeSrc,
long sizeDest,
int ctimeSrc,
int ctimeDest,
int mtimeSrc)
|
static int |
open_RenameDlg(java.lang.String caption,
java.lang.String src,
java.lang.String dest,
int mode,
java.lang.StringBuffer newDestPath,
long sizeSrc,
long sizeDest,
int ctimeSrc,
int ctimeDest,
int mtimeSrc,
int mtimeDest)
RenameDlg related Functions KIO#RenameDlg
Construct a modal, parent-less "rename" dialog, and return
a result code, as well as the new dest. |
static int |
open_SkipDlg(boolean _multi)
|
static int |
open_SkipDlg(boolean _multi,
java.lang.String _error_text)
|
static int |
parseCacheControl(java.lang.String cacheControl)
Parses the string representation of the cache control option. |
static java.lang.String |
pasteActionText()
Returns the text to use for the Paste action, when the application supports pasting files, urls, and clipboard data, using pasteClipboard(). |
static Job |
pasteClipboard(KURL destURL)
|
static Job |
pasteClipboard(KURL destURL,
boolean move)
Pastes the content of the clipboard to the given destination URL. |
static void |
pasteData(KURL destURL,
byte[] data)
Pastes the given data to the given destination URL. |
static CopyJob |
pasteDataAsync(KURL destURL,
byte[] data)
Pastes the given data to the given destination URL. |
static CopyJob |
pasteDataAsync(KURL destURL,
byte[] data,
java.lang.String dialogText)
Pastes the given data to the given destination URL. |
static CopyJob |
pasteMimeSource(org.kde.qt.QMimeSourceInterface data,
KURL destURL,
java.lang.String dialogText,
org.kde.qt.QWidget widget)
|
static CopyJob |
pasteMimeSource(org.kde.qt.QMimeSourceInterface data,
KURL destURL,
java.lang.String dialogText,
org.kde.qt.QWidget widget,
boolean clipboard)
Save the given mimesource data to the given destination URL
after offering the user to choose a data format. |
static boolean |
probably_slow_mounted(java.lang.String filename)
Checks if the path belongs to a filesystem that is probably slow. |
static TransferJob |
put(KURL url,
int permissions,
boolean overwrite,
boolean resume)
|
static TransferJob |
put(KURL url,
int permissions,
boolean overwrite,
boolean resume,
boolean showProgressInfo)
Put (a.k.a. |
static byte[] |
rawErrorDetail(int errorCode,
java.lang.String errorText)
|
static byte[] |
rawErrorDetail(int errorCode,
java.lang.String errorText,
KURL reqUrl)
|
static byte[] |
rawErrorDetail(int errorCode,
java.lang.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 SimpleJob |
rename(KURL src,
KURL dest,
boolean overwrite)
Rename a file or directory. |
static SimpleJob |
rmdir(KURL url)
Removes a single directory. |
static SimpleJob |
special(KURL url,
byte[] data)
|
static SimpleJob |
special(KURL url,
byte[] data,
boolean showProgressInfo)
Execute any command that is specific to one slave (protocol). |
static StatJob |
stat(KURL url)
|
static StatJob |
stat(KURL url,
boolean showProgressInfo)
Find all details for one file or directory. |
static StatJob |
stat(KURL url,
boolean sideIsSource,
short details)
|
static StatJob |
stat(KURL url,
boolean sideIsSource,
short details,
boolean showProgressInfo)
Find all details for one file or directory. |
static StoredTransferJob |
storedGet(KURL url)
|
static StoredTransferJob |
storedGet(KURL url,
boolean reload)
|
static StoredTransferJob |
storedGet(KURL url,
boolean reload,
boolean showProgressInfo)
Get (a.k.a. |
static StoredTransferJob |
storedPut(byte[] arr,
KURL url,
int permissions,
boolean overwrite,
boolean resume)
|
static StoredTransferJob |
storedPut(byte[] arr,
KURL url,
int permissions,
boolean overwrite,
boolean resume,
boolean showProgressInfo)
Put (a.k.a. |
static SimpleJob |
symlink(java.lang.String target,
KURL dest,
boolean overwrite)
|
static SimpleJob |
symlink(java.lang.String target,
KURL dest,
boolean overwrite,
boolean showProgressInfo)
Create or move a symlink. |
static boolean |
testFileSystemFlag(java.lang.String filename,
int flag)
Checks the capabilities of the filesystem to which a given file belongs. |
static CopyJob |
trash(java.util.ArrayList src)
|
static CopyJob |
trash(java.util.ArrayList src,
boolean showProgressInfo)
Trash a list of files or directories. |
static CopyJob |
trash(KURL src)
|
static CopyJob |
trash(KURL src,
boolean showProgressInfo)
Trash a file or directory. |
static SimpleJob |
unmount(java.lang.String point)
|
static SimpleJob |
unmount(java.lang.String point,
boolean showProgressInfo)
Unmount filesystem. |
static java.lang.String |
unsupportedActionErrorString(java.lang.String protocol,
int cmd)
Returns an appropriate error message if the given command cmd
is an unsupported action (ERR_UNSUPPORTED_ACTION). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int S_SKIP
public static final int S_AUTO_SKIP
public static final int S_CANCEL
public static final int M_OVERWRITE
public static final int M_OVERWRITE_ITSELF
public static final int M_SKIP
public static final int M_SINGLE
public static final int M_MULTI
public static final int M_RESUME
public static final int M_NORENAME
public static final int R_RESUME
public static final int R_RESUME_ALL
public static final int R_OVERWRITE
public static final int R_OVERWRITE_ALL
public static final int R_SKIP
public static final int R_AUTO_SKIP
public static final int R_RENAME
public static final int R_CANCEL
public static final int CMD_HOST
public static final int CMD_CONNECT
public static final int CMD_DISCONNECT
public static final int CMD_SLAVE_STATUS
public static final int CMD_SLAVE_CONNECT
public static final int CMD_SLAVE_HOLD
public static final int CMD_NONE
public static final int CMD_TESTDIR
public static final int CMD_GET
public static final int CMD_PUT
public static final int CMD_STAT
public static final int CMD_MIMETYPE
public static final int CMD_LISTDIR
public static final int CMD_MKDIR
public static final int CMD_RENAME
public static final int CMD_COPY
public static final int CMD_DEL
public static final int CMD_CHMOD
public static final int CMD_SPECIAL
public static final int CMD_USERPASS
public static final int CMD_REPARSECONFIGURATION
public static final int CMD_META_DATA
public static final int CMD_SYMLINK
public static final int CMD_SUBURL
public static final int CMD_MESSAGEBOXANSWER
public static final int CMD_RESUMEANSWER
public static final int CMD_CONFIG
public static final int CMD_MULTI_GET
public static final int ERR_CANNOT_OPEN_FOR_READING
public static final int ERR_CANNOT_OPEN_FOR_WRITING
public static final int ERR_CANNOT_LAUNCH_PROCESS
public static final int ERR_INTERNAL
public static final int ERR_MALFORMED_URL
public static final int ERR_UNSUPPORTED_PROTOCOL
public static final int ERR_NO_SOURCE_PROTOCOL
public static final int ERR_UNSUPPORTED_ACTION
public static final int ERR_IS_DIRECTORY
public static final int ERR_IS_FILE
public static final int ERR_DOES_NOT_EXIST
public static final int ERR_FILE_ALREADY_EXIST
public static final int ERR_DIR_ALREADY_EXIST
public static final int ERR_UNKNOWN_HOST
public static final int ERR_ACCESS_DENIED
public static final int ERR_WRITE_ACCESS_DENIED
public static final int ERR_CANNOT_ENTER_DIRECTORY
public static final int ERR_PROTOCOL_IS_NOT_A_FILESYSTEM
public static final int ERR_CYCLIC_LINK
public static final int ERR_USER_CANCELED
public static final int ERR_CYCLIC_COPY
public static final int ERR_COULD_NOT_CREATE_SOCKET
public static final int ERR_COULD_NOT_CONNECT
public static final int ERR_CONNECTION_BROKEN
public static final int ERR_NOT_FILTER_PROTOCOL
public static final int ERR_COULD_NOT_MOUNT
public static final int ERR_COULD_NOT_UNMOUNT
public static final int ERR_COULD_NOT_READ
public static final int ERR_COULD_NOT_WRITE
public static final int ERR_COULD_NOT_BIND
public static final int ERR_COULD_NOT_LISTEN
public static final int ERR_COULD_NOT_ACCEPT
public static final int ERR_COULD_NOT_LOGIN
public static final int ERR_COULD_NOT_STAT
public static final int ERR_COULD_NOT_CLOSEDIR
public static final int ERR_COULD_NOT_MKDIR
public static final int ERR_COULD_NOT_RMDIR
public static final int ERR_CANNOT_RESUME
public static final int ERR_CANNOT_RENAME
public static final int ERR_CANNOT_CHMOD
public static final int ERR_CANNOT_DELETE
public static final int ERR_SLAVE_DIED
public static final int ERR_OUT_OF_MEMORY
public static final int ERR_UNKNOWN_PROXY_HOST
public static final int ERR_COULD_NOT_AUTHENTICATE
public static final int ERR_ABORTED
public static final int ERR_INTERNAL_SERVER
public static final int ERR_SERVER_TIMEOUT
public static final int ERR_SERVICE_NOT_AVAILABLE
public static final int ERR_UNKNOWN
public static final int ERR_UNKNOWN_INTERRUPT
public static final int ERR_CANNOT_DELETE_ORIGINAL
public static final int ERR_CANNOT_DELETE_PARTIAL
public static final int ERR_CANNOT_RENAME_ORIGINAL
public static final int ERR_CANNOT_RENAME_PARTIAL
public static final int ERR_NEED_PASSWD
public static final int ERR_CANNOT_SYMLINK
public static final int ERR_NO_CONTENT
public static final int ERR_DISK_FULL
public static final int ERR_IDENTICAL_FILES
public static final int ERR_SLAVE_DEFINED
public static final int ERR_UPGRADE_REQUIRED
public static final int ERR_POST_DENIED
public static final int UDS_STRING
public static final int UDS_LONG
public static final int UDS_TIME
public static final int UDS_SIZE
public static final int UDS_SIZE_LARGE
public static final int UDS_USER
public static final int UDS_ICON_NAME
public static final int UDS_GROUP
public static final int UDS_EXTRA
public static final int UDS_NAME
public static final int UDS_LOCAL_PATH
public static final int UDS_HIDDEN
public static final int UDS_EXTENDED_ACL
public static final int UDS_ACL_STRING
public static final int UDS_DEFAULT_ACL_STRING
public static final int UDS_ACCESS
public static final int UDS_MODIFICATION_TIME
public static final int UDS_ACCESS_TIME
public static final int UDS_CREATION_TIME
public static final int UDS_FILE_TYPE
public static final int UDS_LINK_DEST
public static final int UDS_URL
public static final int UDS_MIME_TYPE
public static final int UDS_GUESSED_MIME_TYPE
public static final int UDS_XML_PROPERTIES
public static final int CC_CacheOnly
parseCacheControl(java.lang.String)
,
getCacheControlString(int)
,
Constant Field Valuespublic static final int CC_Cache
public static final int CC_Verify
public static final int CC_Refresh
public static final int CC_Reload
public static final int SupportsChmod
public static final int SupportsChown
public static final int SupportsUTime
public static final int SupportsSymlinks
public static final int CaseInsensitive
public static final int HTTP_GET
public static final int HTTP_PUT
public static final int HTTP_POST
public static final int HTTP_HEAD
public static final int HTTP_DELETE
public static final int HTTP_OPTIONS
public static final int DAV_PROPFIND
public static final int DAV_PROPPATCH
public static final int DAV_MKCOL
public static final int DAV_COPY
public static final int DAV_MOVE
public static final int DAV_LOCK
public static final int DAV_UNLOCK
public static final int DAV_SEARCH
public static final int DAV_SUBSCRIBE
public static final int DAV_UNSUBSCRIBE
public static final int DAV_POLL
public static final int DAV_NOTIFY
public static final int HTTP_UNKNOWN
public static final int INF_TOTAL_SIZE
public static final int INF_PROCESSED_SIZE
public static final int INF_SPEED
public static final int INF_REDIRECTION
public static final int INF_MIME_TYPE
public static final int INF_ERROR_PAGE
public static final int INF_WARNING
public static final int INF_GETTING_FILE
public static final int INF_NEED_PASSWD
public static final int INF_INFOMESSAGE
public static final int INF_META_DATA
public static final int INF_NETWORK_STATUS
public static final int INF_MESSAGEBOX
public static final int MSG_DATA
public static final int MSG_DATA_REQ
public static final int MSG_ERROR
public static final int MSG_CONNECTED
public static final int MSG_FINISHED
public static final int MSG_STAT_ENTRY
public static final int MSG_LIST_ENTRIES
public static final int MSG_RENAMED
public static final int MSG_RESUME
public static final int MSG_SLAVE_STATUS
public static final int MSG_SLAVE_ACK
public static final int MSG_NET_REQUEST
public static final int MSG_NET_DROP
public static final int MSG_NEED_SUBURL_DATA
public static final int MSG_CANRESUME
public static final int MSG_AUTH_KEY
public static final int MSG_DEL_AUTH_KEY
public static final int DEFAULT
public static final int STATUSBAR
public static final int LIST
Constructor Detail |
---|
public KIO()
Method Detail |
---|
public static int open_SkipDlg(boolean _multi, java.lang.String _error_text)
public static int open_SkipDlg(boolean _multi)
public static int open_RenameDlg(java.lang.String caption, java.lang.String src, java.lang.String dest, int mode, java.lang.StringBuffer newDestPath, long sizeSrc, long sizeDest, int ctimeSrc, int ctimeDest, int mtimeSrc, int mtimeDest)
KIO#RenameDlg
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.
caption
- the caption for the dialog boxsrc
- the URL of the file/dir we're trying to copy, as it's part of the text messagedest
- the URL of the destination file/dir, i.e. the one that already existsmode
- parameters for the dialog (which buttons to show...),
see RenameDlg_ModenewDest
- the new destination path, valid if R_RENAME was returned.sizeSrc
- size of source filesizeDest
- size of destination filectimeSrc
- creation time of source filectimeDest
- creation time of destination filemtimeSrc
- modification time of source filemtimeDest
- modification time of destination file
public static int open_RenameDlg(java.lang.String caption, java.lang.String src, java.lang.String dest, int mode, java.lang.StringBuffer newDestPath, long sizeSrc, long sizeDest, int ctimeSrc, int ctimeDest, int mtimeSrc)
public static int open_RenameDlg(java.lang.String caption, java.lang.String src, java.lang.String dest, int mode, java.lang.StringBuffer newDestPath, long sizeSrc, long sizeDest, int ctimeSrc, int ctimeDest)
public static int open_RenameDlg(java.lang.String caption, java.lang.String src, java.lang.String dest, int mode, java.lang.StringBuffer newDestPath, long sizeSrc, long sizeDest, int ctimeSrc)
public static int open_RenameDlg(java.lang.String caption, java.lang.String src, java.lang.String dest, int mode, java.lang.StringBuffer newDestPath, long sizeSrc, long sizeDest)
public static int open_RenameDlg(java.lang.String caption, java.lang.String src, java.lang.String dest, int mode, java.lang.StringBuffer newDestPath, long sizeSrc)
public static int open_RenameDlg(java.lang.String caption, java.lang.String src, java.lang.String dest, int mode, java.lang.StringBuffer newDestPath)
public static org.kde.qt.QDataStream op_write(org.kde.qt.QDataStream s, AuthInfo a)
public static org.kde.qt.QDataStream op_read(org.kde.qt.QDataStream s, AuthInfo a)
public static java.lang.String convertSize(long size)
size
from bytes to the string representation.
size
- size in bytes
public static java.lang.String convertSizeWithBytes(long size)
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
size
- size in bytes
public static java.lang.String number(long size)
size
- size in bytes
public static java.lang.String convertSizeFromKB(long kbSize)
kbSize
- size in kilo-bytes
public static java.lang.String convertSeconds(int seconds)
seconds
to a string representing number of days, hours, minutes and seconds
seconds
- number of seconds to convert
public static java.lang.String itemsSummaryString(int items, int files, int dirs, long size, boolean showSize)
items
- the number of items (= files
+ dirs
+ number of symlinks :)files
- the number of filesdirs
- the number of dirssize
- the sum of the size of the files
showSize
- whether to show the size in the result
public static java.lang.String encodeFileName(java.lang.String str)
str
- the file name to encode
public static java.lang.String decodeFileName(java.lang.String str)
str
- the file name to decode
public static java.lang.String buildErrorString(int errorCode, java.lang.String errorText)
errorCode
using the
additional error information provided by errorText.
errorCode
- the error codeerrorText
- the additional error text
public static byte[] rawErrorDetail(int errorCode, java.lang.String errorText, KURL reqUrl, int method)
errorCode
using the
additional error information provided by errorText
, reqUrl
(the request URL), and the ioslave method
.
errorCode
- the error codeerrorText
- the additional error textreqUrl
- the request URLmethod
- the ioslave method
public static byte[] rawErrorDetail(int errorCode, java.lang.String errorText, KURL reqUrl)
public static byte[] rawErrorDetail(int errorCode, java.lang.String errorText)
public static java.lang.String unsupportedActionErrorString(java.lang.String protocol, int cmd)
cmd
is an unsupported action (ERR_UNSUPPORTED_ACTION).
protocol
- name of the protocolcmd
- given command#enum
,
Command
public static int parseCacheControl(java.lang.String cacheControl)
cacheControl
- the string representation
getCacheControlString(int)
public static java.lang.String getCacheControlString(int cacheControl)
cacheControl
- the cache control method
parseCacheControl(java.lang.String)
public static java.lang.String findDeviceMountPoint(java.lang.String device)
device
is mounted
right now. This means, it has to be mounted, not just
defined in fstab.
public static java.lang.String findPathMountPoint(java.lang.String filename)
filename.
For instance if /home is a separate partition, findPathMountPoint("/home/user/blah")
will return /home
filename
- the file name to check
filename
public static boolean probably_slow_mounted(java.lang.String filename)
filename
- the file name to check
public static boolean manually_mounted(java.lang.String filename)
filename
- the file name to check
public static boolean testFileSystemFlag(java.lang.String filename, int flag)
filename
- the file name to checkflag
- the flag to check
The availables flags are:
public static PreviewJob filePreview(java.util.ArrayList items, int width, int height, int iconSize, int iconAlpha, boolean scale, boolean save, java.lang.String[] enabledPlugins)
items
- files to get previews forwidth
- the maximum width to useheight
- 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 overlayscale
- if the image is to be scaled to the requested size or
returned in its original sizesave
- if the image should be cached for later useenabledPlugins
- if non-zero, this points to a list containing
the names of the plugins that may be used.
PreviewJob.availablePlugins()
public static PreviewJob filePreview(java.util.ArrayList items, int width, int height, int iconSize, int iconAlpha, boolean scale, boolean save)
public static PreviewJob filePreview(java.util.ArrayList items, int width, int height, int iconSize, int iconAlpha, boolean scale)
public static PreviewJob filePreview(java.util.ArrayList items, int width, int height, int iconSize, int iconAlpha)
public static PreviewJob filePreview(java.util.ArrayList items, int width, int height, int iconSize)
public static PreviewJob filePreview(java.util.ArrayList items, int width, int height)
public static PreviewJob filePreview(java.util.ArrayList items, int width)
public static DavJob davPropFind(KURL url, org.kde.qt.QDomDocument properties, java.lang.String depth, boolean showProgressInfo)
url.
url
- the URL of the resourceproperties
- a propfind document that describes the properties that
should be retrieveddepth
- the depth of the request. Can be "0", "1" or "infinity"showProgressInfo
- true to show progress information
public static DavJob davPropFind(KURL url, org.kde.qt.QDomDocument properties, java.lang.String depth)
public static DavJob davPropPatch(KURL url, org.kde.qt.QDomDocument properties, boolean showProgressInfo)
url.
url
- the URL of the resourceproperties
- a PROPPACTCH document that describes the properties that
should be modified and its new valuesshowProgressInfo
- true to show progress information
public static DavJob davPropPatch(KURL url, org.kde.qt.QDomDocument properties)
public static DavJob davSearch(KURL url, java.lang.String nsURI, java.lang.String qName, java.lang.String query, boolean showProgressInfo)
url
- the URL of the resourcensURI
- the URI of the search method's qualified nameqName
- the local part of the search method's qualified namequery
- the search stringshowProgressInfo
- true to show progress information
public static DavJob davSearch(KURL url, java.lang.String nsURI, java.lang.String qName, java.lang.String query)
public static MetaInfoJob fileMetaInfo(java.util.ArrayList items)
items
- files to get metainfo for
public static SimpleJob mkdir(KURL url, int permissions)
url
- The URL of the directory to create.permissions
- The permissions to set after creating the
directory (unix-style), -1 for default permissions.
public static SimpleJob mkdir(KURL url)
public static SimpleJob rmdir(KURL url)
url
- The URL of the directory to remove.
public static SimpleJob chmod(KURL url, int permissions)
url
- The URL of file or directory.permissions
- The permissions to set.
public static SimpleJob rename(KURL src, KURL dest, boolean overwrite)
src
- The original URLdest
- The final URLoverwrite
- whether to automatically overwrite if the dest exists
public static SimpleJob symlink(java.lang.String target, KURL dest, boolean overwrite, boolean showProgressInfo)
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 existsshowProgressInfo
- true to show progress information
public static SimpleJob symlink(java.lang.String target, KURL dest, boolean overwrite)
public static SimpleJob special(KURL url, byte[] data, boolean showProgressInfo)
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
public static SimpleJob special(KURL url, byte[] data)
public static SimpleJob mount(boolean ro, java.lang.String fstype, java.lang.String dev, java.lang.String point, boolean showProgressInfo)
kio_file.
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
public static SimpleJob mount(boolean ro, java.lang.String fstype, java.lang.String dev, java.lang.String point)
public static SimpleJob unmount(java.lang.String point, boolean showProgressInfo)
kio_file.
point
- Point to unmount.showProgressInfo
- true to show progress information
public static SimpleJob unmount(java.lang.String point)
public static SimpleJob http_update_cache(KURL url, boolean no_cache, int expireDate)
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.
public static StatJob stat(KURL url, boolean showProgressInfo)
url
- the URL of the fileshowProgressInfo
- true to show progress information
public static StatJob stat(KURL url)
public static StatJob stat(KURL url, boolean sideIsSource, short details, boolean showProgressInfo)
sideIsSource
and details.
url
- the URL of the filesideIsSource
- 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:
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
public static StatJob stat(KURL url, boolean sideIsSource, short details)
public static TransferJob get(KURL url, boolean reload, boolean showProgressInfo)
url
- the URL of the filereload
- true to reload the file, false if it can be taken from the cacheshowProgressInfo
- true to show progress information
public static TransferJob get(KURL url, boolean reload)
public static TransferJob get(KURL url)
public static TransferJob put(KURL url, int permissions, boolean overwrite, boolean resume, boolean showProgressInfo)
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
#multi_get
public static TransferJob put(KURL url, int permissions, boolean overwrite, boolean resume)
public static TransferJob http_post(KURL url, byte[] postData, boolean showProgressInfo)
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.
url
- Where to write the data.postData
- Encoded data to post.showProgressInfo
- true to display
public static TransferJob http_post(KURL url, byte[] postData)
public static StoredTransferJob storedGet(KURL url, boolean reload, boolean showProgressInfo)
url
- the URL of the filereload
- true to reload the file, false if it can be taken from the cacheshowProgressInfo
- true to show progress information
StoredTransferJob
public static StoredTransferJob storedGet(KURL url, boolean reload)
public static StoredTransferJob storedGet(KURL url)
public static StoredTransferJob storedPut(byte[] arr, KURL url, int permissions, boolean overwrite, boolean resume, boolean showProgressInfo)
arr
- The data to writeurl
- 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
StoredTransferJob
public static StoredTransferJob storedPut(byte[] arr, KURL url, int permissions, boolean overwrite, boolean resume)
public static MimetypeJob mimetype(KURL url, boolean showProgressInfo)
url
- the URL of the fileshowProgressInfo
- true to show progress information
public static MimetypeJob mimetype(KURL url)
public static FileCopyJob file_copy(KURL src, KURL dest, int permissions, boolean overwrite, boolean resume, boolean showProgressInfo)
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
public static FileCopyJob file_copy(KURL src, KURL dest, int permissions, boolean overwrite, boolean resume)
public static FileCopyJob file_copy(KURL src, KURL dest, int permissions, boolean overwrite)
public static FileCopyJob file_copy(KURL src, KURL dest, int permissions)
public static FileCopyJob file_copy(KURL src, KURL dest)
public static FileCopyJob file_move(KURL src, KURL dest, int permissions, boolean overwrite, boolean resume, boolean showProgressInfo)
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
public static FileCopyJob file_move(KURL src, KURL dest, int permissions, boolean overwrite, boolean resume)
public static FileCopyJob file_move(KURL src, KURL dest, int permissions, boolean overwrite)
public static FileCopyJob file_move(KURL src, KURL dest, int permissions)
public static FileCopyJob file_move(KURL src, KURL dest)
public static SimpleJob file_delete(KURL src, boolean showProgressInfo)
src
- File to delete.showProgressInfo
- true to show progress information
public static SimpleJob file_delete(KURL src)
public static ListJob listDir(KURL url, boolean showProgressInfo, boolean includeHidden)
url
, which is assumed to be a directory.
"." and ".." are returned, filter them out if you don't want them.
url
- the url of the directoryshowProgressInfo
- true to show progress informationincludeHidden
- true for all files, false to cull out UNIX hidden
files/dirs (whose names start with dot)
public static ListJob listDir(KURL url, boolean showProgressInfo)
public static ListJob listDir(KURL url)
public static ListJob listRecursive(KURL url, boolean showProgressInfo, boolean includeHidden)
url
- the url of the directoryshowProgressInfo
- true to show progress informationincludeHidden
- true for all files, false to cull out UNIX hidden
files/dirs (whose names start with dot)
public static ListJob listRecursive(KURL url, boolean showProgressInfo)
public static ListJob listRecursive(KURL url)
public static CopyJob copy(KURL src, KURL dest, boolean showProgressInfo)
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.
src
- the file or directory to copydest
- the destinationshowProgressInfo
- true to show progress information
copyAs(org.kde.koala.KURL, org.kde.koala.KURL, boolean)
public static CopyJob copy(KURL src, KURL dest)
public static CopyJob copyAs(KURL src, KURL dest, boolean showProgressInfo)
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.
src
- the file or directory to copydest
- the destinationshowProgressInfo
- true to show progress information
public static CopyJob copyAs(KURL src, KURL dest)
public static CopyJob copy(java.util.ArrayList src, KURL dest, boolean showProgressInfo)
src
into a destination directory dest.
src
- the list of files and/or directoriesdest
- the destinationshowProgressInfo
- true to show progress information
public static CopyJob copy(java.util.ArrayList src, KURL dest)
public static CopyJob move(KURL src, KURL dest, boolean showProgressInfo)
src
to the given destination dest.
src
- the file or directory to copydest
- the destinationshowProgressInfo
- true to show progress information
copy(org.kde.koala.KURL, org.kde.koala.KURL, boolean)
,
moveAs(org.kde.koala.KURL, org.kde.koala.KURL, boolean)
public static CopyJob move(KURL src, KURL dest)
public static CopyJob moveAs(KURL src, KURL dest, boolean showProgressInfo)
src
to the given destination dest.
Unlike move()
this operation will fail when the directory already exists.
src
- the file or directory to copydest
- the destinationshowProgressInfo
- true to show progress information
copyAs(org.kde.koala.KURL, org.kde.koala.KURL, boolean)
public static CopyJob moveAs(KURL src, KURL dest)
public static CopyJob move(java.util.ArrayList src, KURL dest, boolean showProgressInfo)
src
to the given destination dest.
src
- the list of files or directories to copydest
- the destinationshowProgressInfo
- true to show progress information
copy(org.kde.koala.KURL, org.kde.koala.KURL, boolean)
public static CopyJob move(java.util.ArrayList src, KURL dest)
public static CopyJob link(KURL src, KURL destDir, boolean showProgressInfo)
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
public static CopyJob link(KURL src, KURL destDir)
public static CopyJob link(java.util.ArrayList src, KURL destDir, boolean showProgressInfo)
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
link(org.kde.koala.KURL, org.kde.koala.KURL, boolean)
public static CopyJob link(java.util.ArrayList src, KURL destDir)
public static CopyJob linkAs(KURL src, KURL dest, boolean showProgressInfo)
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
link(org.kde.koala.KURL, org.kde.koala.KURL, boolean)
,
copyAs(org.kde.koala.KURL, org.kde.koala.KURL, boolean)
public static CopyJob linkAs(KURL src, KURL dest)
public static CopyJob trash(KURL src, boolean showProgressInfo)
src
- file to deleteshowProgressInfo
- true to show progress information
public static CopyJob trash(KURL src)
public static CopyJob trash(java.util.ArrayList src, boolean showProgressInfo)
src
- the files to deleteshowProgressInfo
- true to show progress information
public static CopyJob trash(java.util.ArrayList src)
public static DeleteJob del(KURL src, boolean shred, boolean showProgressInfo)
src
- file to deleteshred
- obsolete (TODO remove in KDE4)showProgressInfo
- true to show progress information
public static DeleteJob del(KURL src, boolean shred)
public static DeleteJob del(KURL src)
public static DeleteJob del(java.util.ArrayList src, boolean shred, boolean showProgressInfo)
src
- the files to deleteshred
- obsolete (TODO remove in KDE4)showProgressInfo
- true to show progress information
public static DeleteJob del(java.util.ArrayList src, boolean shred)
public static DeleteJob del(java.util.ArrayList src)
public static Job pasteClipboard(KURL destURL, boolean move)
destURL
- the URL to receive the datamove
- true to move the data, false to copy
pasteData(org.kde.koala.KURL, byte[])
public static Job pasteClipboard(KURL destURL)
public static void pasteData(KURL destURL, byte[] data)
data
to the given destination URL.
NOTE: This method is blocking (uses NetAccess for saving the data).
Please consider using pasteDataAsync instead.
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 copypasteClipboard(org.kde.koala.KURL, boolean)
public static CopyJob pasteDataAsync(KURL destURL, byte[] data)
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.
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 copypasteClipboard(org.kde.koala.KURL, boolean)
public static CopyJob pasteDataAsync(KURL destURL, byte[] data, java.lang.String dialogText)
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.
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 copydialogText
- the text to show in the dialogpasteClipboard(org.kde.koala.KURL, boolean)
public static CopyJob pasteMimeSource(org.kde.qt.QMimeSourceInterface data, KURL destURL, java.lang.String dialogText, org.kde.qt.QWidget widget, boolean clipboard)
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.
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 dialogwidget
- parent widget to use for dialogsclipboard
- whether the QMimeSource comes from QClipboard. If you
use pasteClipboard for that case, you never have to worry about this parameter.pasteClipboard(org.kde.koala.KURL, boolean)
public static CopyJob pasteMimeSource(org.kde.qt.QMimeSourceInterface data, KURL destURL, java.lang.String dialogText, org.kde.qt.QWidget widget)
public static boolean isClipboardEmpty()
public static java.lang.String pasteActionText()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |