KIO

KIO Namespace Reference

Namespaces

 HostInfo
 
 SslUi
 

Classes

class  AccessManager
 
class  ApplicationLauncherJob
 
class  AskUserActionInterface
 
class  AuthInfo
 
class  BatchRenameJob
 
class  ChmodJob
 
class  CommandLauncherJob
 
struct  CopyInfo
 
class  CopyJob
 
class  DavJob
 
class  DeleteJob
 
class  DeleteOrTrashJob
 
class  DesktopExecParser
 
class  DirectorySizeJob
 
class  DndPopupMenuPlugin
 
class  DropJob
 
class  EmptyTrashJob
 
class  FavIconRequestJob
 
class  FileCopyJob
 
class  FileJob
 
class  FileSystemFreeSpaceJob
 
class  FileUndoManager
 
class  ForwardingSlaveBase
 
class  ForwardingWorkerBase
 
class  IdleSlave
 
class  Job
 
class  JobUiDelegate
 
class  JobUiDelegateExtension
 
class  JobUiDelegateFactory
 
class  KUriFilterSearchProviderActions
 
class  ListJob
 
class  MetaData
 
class  MetaInfoJob
 
class  MimeTypeFinderJob
 
class  MimetypeJob
 
class  MkdirJob
 
class  MkpathJob
 
class  MultiGetJob
 
class  NameFinderJob
 
class  NetAccess
 
class  NetRC
 
class  OpenFileManagerWindowJob
 
class  OpenOrExecuteFileInterface
 
class  OpenUrlJob
 
class  OpenWithHandlerInterface
 
class  PasswordDialog
 
class  PasteJob
 
class  PreviewJob
 
class  RenameDialog
 
class  RenameFileDialog
 
class  RestoreJob
 
class  Scheduler
 
class  SimpleJob
 
class  SkipDialog
 
class  SlaveBase
 
class  SlaveConfig
 
class  SlaveInterface
 
class  SpecialJob
 
class  StatJob
 
class  StoredTransferJob
 
class  TCPSlaveBase
 
class  TCPWorkerBase
 
class  ThumbDevicePixelRatioDependentCreator
 
class  ThumbnailCreator
 
class  ThumbnailResult
 
class  TransferJob
 
class  UDSEntry
 
class  UntrustedProgramHandlerInterface
 
class  WidgetsAskUserActionHandler
 
class  WorkerBase
 
class  WorkerConfig
 
class  WorkerResult
 

Typedefs

using AskIface = AskUserActionInterface
 
typedef QFlags< DropJobFlagDropJobFlags
 
typedef qlonglong fileoffset_t
 
typedef qulonglong filesize_t
 
typedef QFlags< JobFlagJobFlags
 
typedef RenameDialog_Options RenameDialog_Mode
 
typedef QFlags< RenameDialog_OptionRenameDialog_Options
 
typedef QFlags< SkipDialog_OptionSkipDialog_Options
 
typedef RenameDialog_Result SkipDialog_Result
 
typedef QFlags< StatDetailStatDetails
 
typedef QList< UDSEntryUDSEntryList
 

Enumerations

enum  {
  M_OVERWRITE = RenameDialog_Overwrite, M_OVERWRITE_ITSELF = RenameDialog_OverwriteItself, M_SKIP = RenameDialog_Skip, M_MULTI = RenameDialog_MultipleItems,
  M_RESUME = RenameDialog_Resume, M_NORENAME = RenameDialog_NoRename, M_ISDIR = RenameDialog_IsDirectory
}
 
enum  CacheControl {
  CC_CacheOnly, CC_Cache, CC_Verify, CC_Refresh,
  CC_Reload
}
 
enum  ChmodJobState { CHMODJOB_STATE_LISTING, CHMODJOB_STATE_CHMODING }
 
enum  DeleteJobState { DELETEJOB_STATE_STATING, DELETEJOB_STATE_DELETING_FILES, DELETEJOB_STATE_DELETING_DIRS }
 
enum  DropJobFlag { DropJobDefaultFlags = 0, ShowMenuManually = 1 }
 
enum  Error {
  ERR_CANNOT_OPEN_FOR_READING = KJob::UserDefinedError + 1, ERR_CANNOT_OPEN_FOR_WRITING = KJob::UserDefinedError + 2, ERR_CANNOT_LAUNCH_PROCESS = KJob::UserDefinedError + 3, ERR_INTERNAL = KJob::UserDefinedError + 4,
  ERR_MALFORMED_URL = KJob::UserDefinedError + 5, ERR_UNSUPPORTED_PROTOCOL = KJob::UserDefinedError + 6, ERR_NO_SOURCE_PROTOCOL = KJob::UserDefinedError + 7, ERR_UNSUPPORTED_ACTION = KJob::UserDefinedError + 8,
  ERR_IS_DIRECTORY = KJob::UserDefinedError + 9, ERR_IS_FILE = KJob::UserDefinedError + 10, ERR_DOES_NOT_EXIST = KJob::UserDefinedError + 11, ERR_FILE_ALREADY_EXIST = KJob::UserDefinedError + 12,
  ERR_DIR_ALREADY_EXIST = KJob::UserDefinedError + 13, ERR_UNKNOWN_HOST = KJob::UserDefinedError + 14, ERR_ACCESS_DENIED = KJob::UserDefinedError + 15, ERR_WRITE_ACCESS_DENIED = KJob::UserDefinedError + 16,
  ERR_CANNOT_ENTER_DIRECTORY = KJob::UserDefinedError + 17, ERR_PROTOCOL_IS_NOT_A_FILESYSTEM = KJob::UserDefinedError + 18, ERR_CYCLIC_LINK = KJob::UserDefinedError + 19, ERR_USER_CANCELED = KJob::KilledJobError,
  ERR_CYCLIC_COPY = KJob::UserDefinedError + 21, ERR_COULD_NOT_CREATE_SOCKET = KJob::UserDefinedError + 22, ERR_CANNOT_CREATE_SOCKET = KJob::UserDefinedError + 22, ERR_COULD_NOT_CONNECT = KJob::UserDefinedError + 23,
  ERR_CANNOT_CONNECT = KJob::UserDefinedError + 23, ERR_CONNECTION_BROKEN = KJob::UserDefinedError + 24, ERR_NOT_FILTER_PROTOCOL = KJob::UserDefinedError + 25, ERR_COULD_NOT_MOUNT = KJob::UserDefinedError + 26,
  ERR_CANNOT_MOUNT = KJob::UserDefinedError + 26, ERR_COULD_NOT_UNMOUNT = KJob::UserDefinedError + 27, ERR_CANNOT_UNMOUNT = KJob::UserDefinedError + 27, ERR_COULD_NOT_READ = KJob::UserDefinedError + 28,
  ERR_CANNOT_READ = KJob::UserDefinedError + 28, ERR_COULD_NOT_WRITE = KJob::UserDefinedError + 29, ERR_CANNOT_WRITE = KJob::UserDefinedError + 29, ERR_COULD_NOT_BIND = KJob::UserDefinedError + 30,
  ERR_CANNOT_BIND = KJob::UserDefinedError + 30, ERR_COULD_NOT_LISTEN = KJob::UserDefinedError + 31, ERR_CANNOT_LISTEN = KJob::UserDefinedError + 31, ERR_COULD_NOT_ACCEPT = KJob::UserDefinedError + 32,
  ERR_CANNOT_ACCEPT = KJob::UserDefinedError + 32, ERR_COULD_NOT_LOGIN = KJob::UserDefinedError + 33, ERR_CANNOT_LOGIN = KJob::UserDefinedError + 33, ERR_COULD_NOT_STAT = KJob::UserDefinedError + 34,
  ERR_CANNOT_STAT = KJob::UserDefinedError + 34, ERR_COULD_NOT_CLOSEDIR = KJob::UserDefinedError + 35, ERR_CANNOT_CLOSEDIR = KJob::UserDefinedError + 35, ERR_COULD_NOT_MKDIR = KJob::UserDefinedError + 37,
  ERR_CANNOT_MKDIR = KJob::UserDefinedError + 37, ERR_COULD_NOT_RMDIR = KJob::UserDefinedError + 38, ERR_CANNOT_RMDIR = KJob::UserDefinedError + 38, ERR_CANNOT_RESUME = KJob::UserDefinedError + 39,
  ERR_CANNOT_RENAME = KJob::UserDefinedError + 40, ERR_CANNOT_CHMOD = KJob::UserDefinedError + 41, ERR_CANNOT_DELETE = KJob::UserDefinedError + 42, ERR_WORKER_DIED = KJob::UserDefinedError + 43,
  ERR_SLAVE_DIED = ERR_WORKER_DIED, ERR_OUT_OF_MEMORY = KJob::UserDefinedError + 44, ERR_UNKNOWN_PROXY_HOST = KJob::UserDefinedError + 45, ERR_COULD_NOT_AUTHENTICATE = KJob::UserDefinedError + 46,
  ERR_CANNOT_AUTHENTICATE = KJob::UserDefinedError + 46, ERR_ABORTED = KJob::UserDefinedError + 47, ERR_INTERNAL_SERVER = KJob::UserDefinedError + 48, ERR_SERVER_TIMEOUT = KJob::UserDefinedError + 49,
  ERR_SERVICE_NOT_AVAILABLE = KJob::UserDefinedError + 50, ERR_UNKNOWN = KJob::UserDefinedError + 51, ERR_UNKNOWN_INTERRUPT = KJob::UserDefinedError + 53, ERR_CANNOT_DELETE_ORIGINAL = KJob::UserDefinedError + 54,
  ERR_CANNOT_DELETE_PARTIAL = KJob::UserDefinedError + 55, ERR_CANNOT_RENAME_ORIGINAL = KJob::UserDefinedError + 56, ERR_CANNOT_RENAME_PARTIAL = KJob::UserDefinedError + 57, ERR_NEED_PASSWD = KJob::UserDefinedError + 58,
  ERR_CANNOT_SYMLINK = KJob::UserDefinedError + 59, ERR_NO_CONTENT = KJob::UserDefinedError + 60, ERR_DISK_FULL = KJob::UserDefinedError + 61, ERR_IDENTICAL_FILES = KJob::UserDefinedError + 62,
  ERR_WORKER_DEFINED = KJob::UserDefinedError + 63, ERR_SLAVE_DEFINED = ERR_WORKER_DEFINED, ERR_UPGRADE_REQUIRED = KJob::UserDefinedError + 64, ERR_POST_DENIED = KJob::UserDefinedError + 65,
  ERR_COULD_NOT_SEEK = KJob::UserDefinedError + 66, ERR_CANNOT_SEEK = KJob::UserDefinedError + 66, ERR_CANNOT_SETTIME = KJob::UserDefinedError + 67, ERR_CANNOT_CHOWN = KJob::UserDefinedError + 68,
  ERR_POST_NO_SIZE = KJob::UserDefinedError + 69, ERR_DROP_ON_ITSELF = KJob::UserDefinedError + 70, ERR_CANNOT_MOVE_INTO_ITSELF = KJob::UserDefinedError + 71, ERR_PASSWD_SERVER = KJob::UserDefinedError + 72,
  ERR_CANNOT_CREATE_WORKER = KJob::UserDefinedError + 73, ERR_CANNOT_CREATE_SLAVE = ERR_CANNOT_CREATE_WORKER, ERR_FILE_TOO_LARGE_FOR_FAT32 = KJob::UserDefinedError + 74, ERR_OWNER_DIED = KJob::UserDefinedError + 75,
  ERR_PRIVILEGE_NOT_REQUIRED = KJob::UserDefinedError + 76, ERR_CANNOT_TRUNCATE = KJob::UserDefinedError + 77, ERR_SYMLINKS_NOT_SUPPORTED = KJob::UserDefinedError + 78, ERR_TRASH_FILE_TOO_LARGE = KJob::UserDefinedError + 79
}
 
enum  Info {
  INF_TOTAL_SIZE = 10, INF_PROCESSED_SIZE = 11, INF_SPEED, INF_REDIRECTION = 20,
  INF_MIME_TYPE = 21, INF_ERROR_PAGE = 22, INF_WARNING = 23, INF_GETTING_FILE,
  INF_UNUSED = 25, INF_INFOMESSAGE, INF_META_DATA, INF_NETWORK_STATUS,
  INF_MESSAGEBOX, INF_POSITION, INF_TRUNCATED
}
 
enum  JobFlag {
  DefaultFlags = 0, HideProgressInfo = 1, Resume = 2, Overwrite = 4,
  NoPrivilegeExecution = 8
}
 
enum  LoadType { Reload, NoReload }
 
enum  Message {
  MSG_DATA = 100, MSG_DATA_REQ, MSG_ERROR, MSG_CONNECTED,
  MSG_FINISHED, MSG_STAT_ENTRY, MSG_LIST_ENTRIES, MSG_RENAMED,
  MSG_RESUME, MSG_SLAVE_STATUS, MSG_SLAVE_ACK, MSG_NET_REQUEST,
  MSG_NET_DROP, MSG_NEED_SUBURL_DATA, MSG_CANRESUME, MSG_AUTH_KEY,
  MSG_DEL_AUTH_KEY, MSG_OPENED, MSG_WRITTEN, MSG_HOST_INFO_REQ,
  MSG_PRIVILEGE_EXEC, MSG_SLAVE_STATUS_V2
}
 
enum  PrivilegeOperationStatus { OperationAllowed = 1, OperationCanceled, OperationNotAllowed }
 
enum  RenameDialog_Option {
  RenameDialog_Overwrite = 1, RenameDialog_OverwriteItself = 2, RenameDialog_Skip = 4, RenameDialog_MultipleItems,
  RenameDialog_Resume = 16, RenameDialog_NoRename = 64, RenameDialog_IsDirectory, RenameDialog_DestIsDirectory = 128,
  RenameDialog_SourceIsDirectory = 256
}
 
enum  RenameDialog_Result {
  Result_Cancel = 0, Result_Rename = 1, Result_Skip = 2, Result_AutoSkip = 3,
  Result_Overwrite = 4, Result_OverwriteAll = 5, Result_Resume = 6, Result_ResumeAll = 7,
  Result_AutoRename = 8, Result_Retry = 9, Result_OverwriteWhenOlder = 10, Result_ReplaceInvalidChars = 11,
  Result_ReplaceAllInvalidChars = 12, R_CANCEL = Result_Cancel, R_RENAME = Result_Rename, R_SKIP = Result_Skip,
  R_AUTO_SKIP = Result_AutoSkip, R_OVERWRITE = Result_Overwrite, R_OVERWRITE_ALL = Result_OverwriteAll, R_RESUME = Result_Resume,
  R_RESUME_ALL = Result_ResumeAll, R_AUTO_RENAME = Result_AutoRename, R_RETRY = Result_Retry, S_CANCEL = Result_Cancel,
  S_SKIP = Result_Skip, S_AUTO_SKIP = Result_AutoSkip, S_RETRY = Result_Retry
}
 
enum  SkipDialog_Option { SkipDialog_MultipleItems = 8, SkipDialog_Replace_Invalid_Chars = 16, SkipDialog_Hide_Retry = 32 }
 
enum  StatDetail {
  StatNoDetails = 0x0, StatBasic = 0x1, StatUser = 0x2, StatTime = 0x4,
  StatResolveSymlink = 0x8, StatAcl = 0x10, StatInode = 0x20, StatRecursiveSize = 0x40,
  StatMimeType = 0x80, StatDefaultDetails = StatBasic | StatUser | StatTime | StatAcl | StatResolveSymlink
}
 

Functions

WorkerConfigSingleton * _workerConfigSelf ()
 
KIOCORE_EXPORT BatchRenameJobbatchRename (const QList< QUrl > &src, const QString &newName, int index, QChar placeHolder, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT QString buildErrorString (int errorCode, const QString &errorText)
 
KIOCORE_EXPORT QTime calculateRemaining (KIO::filesize_t totalSize, KIO::filesize_t processedSize, KIO::filesize_t speed)
 
KIOCORE_EXPORT unsigned int calculateRemainingSeconds (KIO::filesize_t totalSize, KIO::filesize_t processedSize, KIO::filesize_t speed)
 
KIOWIDGETS_EXPORT bool canPasteMimeData (const QMimeData *data)
 
KIOCORE_EXPORT ChmodJobchmod (const KFileItemList &lstItems, int permissions, int mask, const QString &newOwner, const QString &newGroup, bool recursive, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT SimpleJobchmod (const QUrl &url, int permissions)
 
KIOCORE_EXPORT SimpleJobchown (const QUrl &url, const QString &owner, const QString &group)
 
KIOCORE_EXPORT QFile::Permissions convertPermissions (int permissions)
 
KIOCORE_EXPORT QString convertSeconds (unsigned int seconds)
 
KIOCORE_EXPORT QString convertSize (KIO::filesize_t size)
 
KIOCORE_EXPORT QString convertSizeFromKiB (KIO::filesize_t kibSize)
 
KIOCORE_EXPORT CopyJobcopy (const QList< QUrl > &src, const QUrl &dest, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT CopyJobcopy (const QUrl &src, const QUrl &dest, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT CopyJobcopyAs (const QUrl &src, const QUrl &dest, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT KJobUiDelegatecreateDefaultJobUiDelegate ()
 
KIOCORE_EXPORT KJobUiDelegatecreateDefaultJobUiDelegate (KJobUiDelegate::Flags flags, QWidget *window)
 
KIOCORE_EXPORT DavJobdavPropFind (const QUrl &url, const QDomDocument &properties, const QString &depth, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT DavJobdavPropFind (const QUrl &url, const QString &properties, const QString &depth, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT DavJobdavPropPatch (const QUrl &url, const QDomDocument &properties, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT DavJobdavPropPatch (const QUrl &url, const QString &properties, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT DavJobdavReport (const QUrl &url, const QString &report, const QString &depth, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT DavJobdavSearch (const QUrl &url, const QString &nsURI, const QString &qName, const QString &query, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT QString decodeFileName (const QString &str)
 
KIOCORE_EXPORT JobUiDelegateExtensiondefaultJobUiDelegateExtension ()
 
KIOCORE_EXPORT JobUiDelegateFactorydefaultJobUiDelegateFactory ()
 
KIOCORE_EXPORT JobUiDelegateFactoryV2 * defaultJobUiDelegateFactoryV2 ()
 
KIOCORE_EXPORT DeleteJobdel (const QList< QUrl > &src, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT DeleteJobdel (const QUrl &src, JobFlags flags=DefaultFlags)
 
template<typename T >
delegateExtension (KJob *job)
 
KIOCORE_EXPORT KIO::StatDetails detailsToStatDetails (int details)
 
KIOCORE_EXPORT DirectorySizeJobdirectorySize (const KFileItemList &lstItems)
 
KIOCORE_EXPORT DirectorySizeJobdirectorySize (const QUrl &directory)
 
KIOWIDGETS_EXPORT DropJobdrop (const QDropEvent *dropEvent, const QUrl &destUrl, DropJobFlags dropjobFlags, JobFlags flags=DefaultFlags)
 
KIOWIDGETS_EXPORT DropJobdrop (const QDropEvent *dropEvent, const QUrl &destUrl, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT EmptyTrashJobemptyTrash ()
 
KIOCORE_EXPORT QString encodeFileName (const QString &str)
 
KIOCORE_EXPORT QString favIconForUrl (const QUrl &url)
 
KIOCORE_EXPORT FileCopyJobfile_copy (const QUrl &src, const QUrl &dest, int permissions=-1, JobFlags flags=DefaultFlags)
 
FileCopyJobfile_copy (const QUrl &src, const QUrl &dest, JobFlags flags)=delete
 
KIOCORE_EXPORT SimpleJobfile_delete (const QUrl &src, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT FileCopyJobfile_move (const QUrl &src, const QUrl &dest, int permissions=-1, JobFlags flags=DefaultFlags)
 
FileCopyJobfile_move (const QUrl &src, const QUrl &dest, JobFlags flags)=delete
 
KIOWIDGETS_EXPORT PreviewJobfilePreview (const KFileItemList &items, const QSize &size, const QStringList *enabledPlugins=nullptr)
 
KIOWIDGETS_EXPORT PreviewJobfilePreview (const KFileItemList &items, int width, int height=0, int iconSize=0, int iconAlpha=70, bool scale=true, bool save=true, const QStringList *enabledPlugins=nullptr)
 
KIOWIDGETS_EXPORT PreviewJobfilePreview (const QList< QUrl > &items, int width, int height=0, int iconSize=0, int iconAlpha=70, bool scale=true, bool save=true, const QStringList *enabledPlugins=nullptr)
 
KIOCORE_EXPORT FileSystemFreeSpaceJobfileSystemFreeSpace (const QUrl &url)
 
KIOCORE_EXPORT TransferJobget (const QUrl &url, LoadType reload=NoReload, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT QString getCacheControlString (KIO::CacheControl cacheControl)
 
KIOCORE_EXPORT KJobTrackerInterfacegetJobTracker ()
 
OpenFileManagerWindowJobhighlightInFileManager (const QList< QUrl > &urls, const QByteArray &asn=QByteArray())
 
KIOCORE_EXPORT TransferJobhttp_delete (const QUrl &url, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT TransferJobhttp_post (const QUrl &url, const QByteArray &postData, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT TransferJobhttp_post (const QUrl &url, QIODevice *device, qint64 size=-1, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT SimpleJobhttp_update_cache (const QUrl &url, bool no_cache, const QDateTime &expireDate)
 
KIOCORE_EXPORT QString iconNameForUrl (const QUrl &url)
 
KIOWIDGETS_EXPORT bool isClipboardDataCut (const QMimeData *mimeData)
 
KIOCORE_EXPORT QString itemsSummaryString (uint items, uint files, uint dirs, KIO::filesize_t size, bool showSize)
 
KIOCORE_EXPORT CopyJoblink (const QList< QUrl > &src, const QUrl &destDir, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT CopyJoblink (const QUrl &src, const QUrl &destDir, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT CopyJoblinkAs (const QUrl &src, const QUrl &dest, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT ListJoblistDir (const QUrl &url, JobFlags flags=DefaultFlags, bool includeHidden=true)
 
KIOCORE_EXPORT ListJoblistRecursive (const QUrl &url, JobFlags flags=DefaultFlags, bool includeHidden=true)
 
std::variant< std::unique_ptr< KIO::SlaveBase >, std::unique_ptr< KIO::WorkerBase > > makeWorker (const QByteArray &appSocket, WorkerFactory *factory)
 
KIOCORE_EXPORT MimetypeJobmimetype (const QUrl &url, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT MkdirJobmkdir (const QUrl &url, int permissions=-1)
 
KIOCORE_EXPORT MkpathJobmkpath (const QUrl &url, const QUrl &baseUrl=QUrl(), JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT StatJobmostLocalUrl (const QUrl &url, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT SimpleJobmount (bool ro, const QByteArray &fstype, const QString &dev, const QString &point, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT CopyJobmove (const QList< QUrl > &src, const QUrl &dest, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT CopyJobmove (const QUrl &src, const QUrl &dest, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT CopyJobmoveAs (const QUrl &src, const QUrl &dest, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT MultiGetJobmulti_get (long id, const QUrl &url, const MetaData &metaData)
 
KIOCORE_EXPORT QString number (KIO::filesize_t size)
 
KIOCORE_EXPORT FileJobopen (const QUrl &url, QIODevice::OpenMode mode)
 
KIOCORE_EXPORT QDataStreamoperator<< (QDataStream &s, const AuthInfo &a)
 
KIOCORE_EXPORT QDBusArgumentoperator<< (QDBusArgument &argument, const AuthInfo &a)
 
const KIOCORE_EXPORT QDBusArgumentoperator>> (const QDBusArgument &argument, AuthInfo &a)
 
KIOCORE_EXPORT QDataStreamoperator>> (QDataStream &s, AuthInfo &a)
 
KIOCORE_EXPORT KIO::CacheControl parseCacheControl (const QString &cacheControl)
 
KIOWIDGETS_EXPORT PasteJobpaste (const QMimeData *mimeData, const QUrl &destDir, JobFlags flags=DefaultFlags)
 
KIOWIDGETS_EXPORT QString pasteActionText ()
 
KIOWIDGETS_EXPORT QString pasteActionText (const QMimeData *mimeData, bool *enable, const KFileItem &destItem)
 
KIOWIDGETS_EXPORT JobpasteClipboard (const QUrl &destURL, QWidget *widget, bool move=false)
 
KIOWIDGETS_EXPORT JobpasteMimeData (const QMimeData *data, const QUrl &destUrl, const QString &dialogText, QWidget *widget)
 
template<typename T >
T * perThreadGlobalStatic ()
 
KIOWIDGETS_EXPORT QPixmap pixmapForUrl (const QUrl &url, int dummy=0, KIconLoader::Group group=KIconLoader::Desktop, int force_size=0, int state=0, QString *path=nullptr)
 
KIOCORE_EXPORT TransferJobput (const QUrl &url, int permissions, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT QByteArray rawErrorDetail (int errorCode, const QString &errorText, const QUrl *reqUrl=nullptr, int method=-1)
 
static void readConfig (KConfig *config, const QString &group, MetaData *metaData)
 
KIOCORE_EXPORT SimpleJobrename (const QUrl &src, const QUrl &dest, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT RestoreJobrestoreFromTrash (const QList< QUrl > &urls, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT SimpleJobrmdir (const QUrl &url)
 
KIOWIDGETS_EXPORT void setClipboardDataCut (QMimeData *mimeData, bool cut)
 
KIOCORE_EXPORT void setDefaultJobUiDelegateExtension (JobUiDelegateExtension *extension)
 
KIOCORE_EXPORT void setDefaultJobUiDelegateFactory (JobUiDelegateFactory *factory)
 
KIOCORE_EXPORT void setDefaultJobUiDelegateFactoryV2 (JobUiDelegateFactoryV2 *factory)
 
KIOCORE_EXPORT void setJobTracker (KJobTrackerInterface *tracker)
 
KIOCORE_EXPORT SimpleJobsetModificationTime (const QUrl &url, const QDateTime &mtime)
 
KIOCORE_EXPORT SimpleJobspecial (const QUrl &url, const QByteArray &data, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT StatJobstat (const QUrl &url, bool sideIsSource, short int details, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT StatJobstat (const QUrl &url, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT StatJobstat (const QUrl &url, KIO::StatJob::StatSide side, short int details, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT StatJobstatDetails (const QUrl &url, KIO::StatJob::StatSide side, KIO::StatDetails details=KIO::StatDefaultDetails, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT StoredTransferJobstoredGet (const QUrl &url, LoadType reload=NoReload, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT StoredTransferJobstoredHttpPost (const QByteArray &arr, const QUrl &url, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT StoredTransferJobstoredHttpPost (QIODevice *device, const QUrl &url, qint64 size=-1, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT StoredTransferJobstoredPut (const QByteArray &arr, const QUrl &url, int permissions, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT StoredTransferJobstoredPut (QIODevice *input, const QUrl &url, int permissions, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT QString suggestName (const QUrl &baseURL, const QString &oldName)
 
KIOCORE_EXPORT SimpleJobsymlink (const QString &target, const QUrl &dest, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT CopyJobtrash (const QList< QUrl > &src, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT CopyJobtrash (const QUrl &src, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT SimpleJobunmount (const QString &point, JobFlags flags=DefaultFlags)
 
KIOCORE_EXPORT QString unsupportedActionErrorString (const QString &protocol, int cmd)
 
KIOCORE_EXPORT QUrl upUrl (const QUrl &url)
 

Variables

static constexpr double s_mPI2 = 1.57079632679489661923
 
static const int switchIconInterval = 1000
 

Detailed Description

A namespace for KIO globals.

Typedef Documentation

◆ DropJobFlags

Stores a combination of DropJobFlag values.

Definition at line 35 of file dropjob.h.

◆ fileoffset_t

typedef qlonglong KIO::fileoffset_t

64-bit file offset

Definition at line 37 of file global.h.

◆ filesize_t

typedef qulonglong KIO::filesize_t

64-bit file size

Definition at line 39 of file global.h.

◆ JobFlags

Stores a combination of JobFlag values.

Definition at line 305 of file job_base.h.

◆ RenameDialog_Mode

Deprecated:
since 5.0, use RenameDialog_Options

Definition at line 66 of file jobuidelegateextension.h.

◆ RenameDialog_Options

Stores a combination of RenameDialog_Option values.

Definition at line 45 of file jobuidelegateextension.h.

◆ SkipDialog_Options

Stores a combination of SkipDialog_Option values.

Definition at line 106 of file jobuidelegateextension.h.

◆ StatDetails

Stores a combination of StatDetail values.

Definition at line 394 of file global.h.

◆ UDSEntryList

A directory listing is a list of UDSEntry instances.

To list the name and size of all the files in a directory listing you would do:

KIO::UDSEntryList::ConstIterator it = entries.begin();
const KIO::UDSEntryList::ConstIterator end = entries.end();
for (; it != end; ++it) {
const KIO::UDSEntry& entry = *it;
bool isDir = entry.isDir();
...
}

Definition at line 392 of file udsentry.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Deprecated:
since 5.0, use the RenameDialog_Option enum values

Definition at line 53 of file jobuidelegateextension.h.

◆ CacheControl

Specifies how to use the cache.

See also
parseCacheControl()
getCacheControlString()
Enumerator
CC_CacheOnly 

Fail request if not in cache.

CC_Cache 

Use cached entry if available.

CC_Verify 

Validate cached entry with remote site if expired.

CC_Refresh 

Always validate cached entry with remote site.

CC_Reload 

Always fetch from remote site.

Definition at line 341 of file global.h.

◆ DropJobFlag

Special flag of DropJob in addition to KIO::JobFlag.

See also
DropJobFlags
Since
5.67
Enumerator
ShowMenuManually 

show the menu manually with DropJob::showMenu

Definition at line 28 of file dropjob.h.

◆ Error

enum KIO::Error

Error codes that can be emitted by KIO.

Enumerator
ERR_IS_DIRECTORY 

... where a file was expected

ERR_IS_FILE 

... where a directory was expected (e.g. listing)

ERR_COULD_NOT_CREATE_SOCKET 
Deprecated:
Since 5.0, use ERR_CANNOT_CREATE_SOCKET
ERR_COULD_NOT_CONNECT 
Deprecated:
Since 5.0, use ERR_CANNOT_CONNECT
ERR_COULD_NOT_MOUNT 
Deprecated:
Since 5.0, use ERR_CANNOT_MOUNT
ERR_COULD_NOT_UNMOUNT 
Deprecated:
Since 5.0, use ERR_CANNOT_UNMOUNT
ERR_COULD_NOT_READ 
Deprecated:
Since 5.0, use ERR_CANNOT_READ
ERR_COULD_NOT_WRITE 
Deprecated:
Since 5.0, use ERR_CANNOT_WRITE
ERR_COULD_NOT_BIND 
Deprecated:
Since 5.0, use ERR_CANNOT_BIND
ERR_COULD_NOT_LISTEN 
Deprecated:
Since 5.0, use ERR_CANNOT_LISTEN
ERR_COULD_NOT_ACCEPT 
Deprecated:
Since 5.0, use ERR_CANNOT_ACCEPT
ERR_COULD_NOT_LOGIN 
Deprecated:
Since 5.0, use ERR_CANNOT_LOGIN
ERR_COULD_NOT_STAT 
Deprecated:
Since 5.0, use ERR_CANNOT_STAT
ERR_COULD_NOT_CLOSEDIR 
Deprecated:
Since 5.0, use ERR_CANNOT_CLOSEDIR
ERR_COULD_NOT_MKDIR 
Deprecated:
Since 5.0, use ERR_CANNOT_MKDIR
ERR_COULD_NOT_RMDIR 
Deprecated:
Since 5.0, use ERR_CANNOT_RMDIR
ERR_WORKER_DIED 
Since
5.96
ERR_SLAVE_DIED 
Deprecated:
Since 5.96, use ERR_WORKER_DIED
ERR_COULD_NOT_AUTHENTICATE 
Deprecated:
Since 5.0, use ERR_CANNOT_AUTHENTICATE
ERR_ABORTED 

Action got aborted from application side.

ERR_NO_CONTENT 

Action succeeded but no content will follow.

ERR_IDENTICAL_FILES 

src==dest when moving/copying

ERR_WORKER_DEFINED 

For worker specified errors that can be rich text.

Email links will be handled by the standard email app and all hrefs will be handled by the standard browser. <a href="exec:/khelpcenter ?" will be forked.

Since
5.96
ERR_SLAVE_DEFINED 

For slave specified errors that can be rich text.

Email links will be handled by the standard email app and all hrefs will be handled by the standard browser. <a href="exec:/khelpcenter ?" will be forked.

Deprecated:
Since 5.96, use ERR_WORKER_DEFINED
ERR_UPGRADE_REQUIRED 

A transport upgrade is required to access this.

object. For instance, TLS is demanded by the server in order to continue.

ERR_POST_DENIED 

Issued when trying to POST data to a certain Ports.

ERR_COULD_NOT_SEEK 
Deprecated:
Since 5.0, use ERR_CANNOT_SEEK
ERR_CANNOT_SETTIME 

Emitted by setModificationTime.

ERR_DROP_ON_ITSELF 

from KIO::DropJob,

Since
5.6
ERR_CANNOT_MOVE_INTO_ITSELF 

emitted by KIO::move,

Since
5.18
ERR_PASSWD_SERVER 

returned by WorkerBase::openPasswordDialog and SlaveBase::openPasswordDialogV2,

Since
5.24
ERR_CANNOT_CREATE_WORKER 

used by Slave::createSlave,

Since
5.96
ERR_CANNOT_CREATE_SLAVE 

used by Slave::createSlave,

Since
5.30
Deprecated:
Since 5.96, use ERR_CANNOT_CREATE_WORKER
ERR_FILE_TOO_LARGE_FOR_FAT32 
Since
5.54
ERR_OWNER_DIED 

Value used between kuiserver and views when the job owner disappears unexpectedly. It should not be emitted by workers.

Since
5.54
ERR_PRIVILEGE_NOT_REQUIRED 

used by file ioworker,

Since
5.60
ERR_SYMLINKS_NOT_SUPPORTED 

Indicates failure to create a symlink due to the underlying filesystem (FAT/ExFAT) not supporting them.

Used by e.g. CopyJob.

Since
5.88
ERR_TRASH_FILE_TOO_LARGE 

Moving files/dirs to the Trash failed due to size constraints.

Since
5.100

Definition at line 144 of file global.h.

◆ Info

enum KIO::Info

Identifiers for KIO informational messages.

Enumerator
INF_GETTING_FILE 
Deprecated:
Since 3.0
INF_UNUSED 

now unused

Definition at line 33 of file slaveinterface.h.

◆ JobFlag

Flags for the job properties.

Not all flags are supported in all cases. Please see documentation of the calling function!

See also
JobFlags
Enumerator
DefaultFlags 

Show the progress info GUI, no Resume and no Overwrite.

HideProgressInfo 

Hide progress information dialog, i.e. don't show a GUI.

Resume 

When set, automatically append to the destination file if it exists already.

WARNING: this is NOT the builtin support for offering the user to resume a previous partial download. The Resume option is much less used, it allows to append to an existing file. This is used by KIO::put(), KIO::file_copy(), KIO::file_move().

Overwrite 

When set, automatically overwrite the destination if it exists already.

This is used by KIO::rename(), KIO::put(), KIO::file_copy(), KIO::file_move(), KIO::symlink(). Otherwise the operation will fail with ERR_FILE_ALREADY_EXIST or ERR_DIR_ALREADY_EXIST.

NoPrivilegeExecution 

When set, notifies the worker that application/job does not want privilege execution.

So in case of failure due to insufficient privileges show an error without attempting to run the operation as root first.

Since
5.43

Definition at line 266 of file job_base.h.

◆ Message

Identifiers for KIO data messages.

Enumerator
MSG_RENAMED 

unused

MSG_SLAVE_STATUS 
Deprecated:
Since 5.45, use MSG_SLAVE_STATUS_V2
MSG_AUTH_KEY 
Deprecated:
Since 3.1
MSG_DEL_AUTH_KEY 
Deprecated:
Since 3.1

Definition at line 60 of file slaveinterface.h.

◆ PrivilegeOperationStatus

Specifies privilege file operation status.

Since
5.43

Definition at line 353 of file global.h.

◆ RenameDialog_Option

See also
RenameDialog_Options
Since
5.0
Enumerator
RenameDialog_Overwrite 

We have an existing destination, show details about it and offer to overwrite it.

RenameDialog_OverwriteItself 

Warn that the current operation would overwrite a file with itself, which is not allowed.

RenameDialog_Skip 

Offer a "Skip" button, to skip other files too. Requires RenameDialog_MultipleItems.

RenameDialog_MultipleItems 

Set if the current operation concerns multiple files, so it makes sense to offer buttons that apply the user's choice to all files/folders.

RenameDialog_Resume 

Offer a "Resume" button (plus "Resume All" if RenameDialog_MultipleItems).

RenameDialog_NoRename 

Don't offer a "Rename" button.

RenameDialog_IsDirectory 
Deprecated:
since 5.78, use RenameDialog_DestIsDirectory instead.
RenameDialog_DestIsDirectory 

The destination is a directory, the dialog updates labels and tooltips accordingly.

Since
5.78
RenameDialog_SourceIsDirectory 

The source is a directory, the dialog updates labels and tooltips accordingly.

Since
5.78

Definition at line 27 of file jobuidelegateextension.h.

◆ RenameDialog_Result

The result of a rename or skip dialog.

Enumerator
Result_OverwriteWhenOlder 

Can be returned only when multiple files are passed, Option overwrite is passed And files modification times are valid.

Since
5.77
Result_ReplaceInvalidChars 

Can be returned if the user selects to replace any character disallowed by the destination filesystem with an underscore "_".

See SkipDialog_Option::SkipDialog_Replace_Invalid_Chars

Since
5.86
Result_ReplaceAllInvalidChars 

The same as Result_ReplaceInvalidChars, but the user selected to automatically replace any invalid character, without being asked about every file/folder.

Since
5.86

Definition at line 112 of file jobuidelegateextension.h.

◆ SkipDialog_Option

See also
SkipDialog_Options
Since
5.0
Enumerator
SkipDialog_MultipleItems 

Set if the current operation concerns multiple files, so it makes sense to offer buttons that apply the user's choice to all files/folders.

SkipDialog_Replace_Invalid_Chars 

Set if the current operation involves copying files/folders with certain characters in their names that are not supported by the destination filesystem (e.g. VFAT and NTFS disallow "*" in file/folder names).

This will make the SkipDialog show a "Replace" button that can be used to instruct the underlying job to replace any problematic character with an underscore "_".

Since
5.86
SkipDialog_Hide_Retry 

Set if the current operation cannot be retried.

For example if there is an issue that involves the destination filesystem support, e.g. VFAT and ExFat don't support symlinks, then retrying doesn't make sense.

Since
5.88

Definition at line 73 of file jobuidelegateextension.h.

◆ StatDetail

Describes the fields that a stat command will retrieve.

See also
UDSEntry
StatDetails
Since
5.69
Enumerator
StatNoDetails 

No field returned, useful to check if a file exists.

StatBasic 

Filename, access, type, size, linkdest.

StatUser 

uid, gid

StatTime 

atime, mtime, btime

StatResolveSymlink 

Resolve symlinks.

StatAcl 

ACL data.

StatInode 

dev, inode

StatRecursiveSize 

Recursive size.

Since
5.70
StatMimeType 

MIME type.

Since
5.82
StatDefaultDetails 

Default StatDetail flag when creating a StatJob.

Equivalent to setting StatBasic | StatUser | StatTime | StatAcl | StatResolveSymlink

Definition at line 365 of file global.h.

Function Documentation

◆ batchRename()

BatchRenameJob * KIO::batchRename ( const QList< QUrl > &  src,
const QString newName,
int  index,
QChar  placeHolder,
KIO::JobFlags  flags = DefaultFlags 
)

Renames multiple files at once.

The new filename is obtained by replacing the characters represented by placeHolder by the index index. E.g. Calling batchRename({"file:///Test.jpg"}, "Test #" 12, '#') renames the file to "Test 12.jpg". A connected sequence of placeholders results in leading zeros. batchRename({"file:///Test.jpg"}, "Test ####" 12, '#') renames the file to "Test 0012.jpg". And if no placeholder is there then index is appended to newName. Calling batchRename({"file:///Test.jpg"}, "NewTest" 12, '#') renames the file to "NewTest12.jpg".

Parameters
srcThe list of items to rename.
newNameThe base name to use in all new filenames.
indexThe integer(incremented after renaming a file) to add to the base name.
placeHolderThe character(s) which index will replace.
Returns
A pointer to the job handling the operation.
Since
5.42

Definition at line 217 of file batchrenamejob.cpp.

◆ buildErrorString()

KIOCORE_EXPORT QString KIO::buildErrorString ( int  errorCode,
const QString errorText 
)

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

Parameters
errorCodethe error code
errorTextthe additional error text
Returns
the created error string

Definition at line 27 of file job_error.cpp.

◆ calculateRemaining()

KIOCORE_EXPORT QTime KIO::calculateRemaining ( KIO::filesize_t  totalSize,
KIO::filesize_t  processedSize,
KIO::filesize_t  speed 
)

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

Parameters
totalSizetotal size in bytes
processedSizeprocessed size in bytes
speedspeed in bytes per second
Returns
calculated remaining time
Deprecated:
Since 3.4, use calculateRemainingSeconds() instead, as QTime is limited to 23:59:59

Definition at line 88 of file global.cpp.

◆ calculateRemainingSeconds()

KIOCORE_EXPORT unsigned int KIO::calculateRemainingSeconds ( KIO::filesize_t  totalSize,
KIO::filesize_t  processedSize,
KIO::filesize_t  speed 
)

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

Parameters
totalSizetotal size in bytes
processedSizeprocessed size in bytes
speedspeed in bytes per second
Returns
calculated remaining time in seconds

Definition at line 62 of file global.cpp.

◆ canPasteMimeData()

KIOWIDGETS_EXPORT bool KIO::canPasteMimeData ( const QMimeData data)

Returns true if pasteMimeData will find any interesting format in data.

You can use this method to enable/disable the paste action appropriately.

Since
5.0 (was called canPasteMimeSource before)

Definition at line 215 of file paste.cpp.

◆ chmod() [1/2]

ChmodJob * KIO::chmod ( const KFileItemList lstItems,
int  permissions,
int  mask,
const QString newOwner,
const QString newGroup,
bool  recursive,
JobFlags  flags = DefaultFlags 
)

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

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

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

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

Parameters
lstItemsThe file items representing several files or directories.
permissionsthe permissions we want to set
maskthe bits we are allowed to change. For instance, if mask is 0077, we don't change the "user" bits, only "group" and "others".
newOwnerIf non-empty, the new owner for the files
newGroupIf non-empty, the new group for the files
recursivewhether to open directories recursively
flagsWe support HideProgressInfo here
Returns
The job handling the operation.

Definition at line 288 of file chmodjob.cpp.

◆ chmod() [2/2]

SimpleJob * KIO::chmod ( const QUrl url,
int  permissions 
)

Changes permissions on a file or directory.

See the other chmod in chmodjob.h for changing many files or directories.

Parameters
urlThe URL of file or directory.
permissionsThe permissions to set.
Returns
the job handling the operation.

Definition at line 343 of file simplejob.cpp.

◆ chown()

SimpleJob * KIO::chown ( const QUrl url,
const QString owner,
const QString group 
)

Changes ownership and group of a file or directory.

Parameters
urlThe URL of file or directory.
ownerthe new owner
groupthe new group
Returns
the job handling the operation.

Definition at line 350 of file simplejob.cpp.

◆ convertPermissions()

QFile::Permissions KIO::convertPermissions ( int  permissions)

Converts KIO file permissions from mode_t to QFile::Permissions format.

This is a convenience function for converting KIO permissions parameter from mode_t to QFile::Permissions.

Parameters
permissionsKIO file permissions.
Returns
-1 if permissions is -1, otherwise its OR'ed QFile::Permission equivalent.
Since
4.12

Definition at line 1281 of file job_error.cpp.

◆ convertSeconds()

KIOCORE_EXPORT QString KIO::convertSeconds ( unsigned int  seconds)

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

Parameters
secondsnumber of seconds to convert
Returns
string representation in a locale depending format

Definition at line 71 of file global.cpp.

◆ convertSize()

KIOCORE_EXPORT QString KIO::convertSize ( KIO::filesize_t  size)

Converts size from bytes to the string representation.

Parameters
sizesize in bytes
Returns
converted size as a string - e.g. 123.4 KiB , 12.0 MiB

Definition at line 43 of file global.cpp.

◆ convertSizeFromKiB()

KIOCORE_EXPORT QString KIO::convertSizeFromKiB ( KIO::filesize_t  kibSize)

Converts size from kibi-bytes (2^10) to the string representation.

Parameters
kibSizesize in kibi-bytes (2^10)
Returns
converted size as a string - e.g. 123.4 KiB , 12.0 MiB

Definition at line 50 of file global.cpp.

◆ copy() [1/2]

CopyJob * KIO::copy ( const QList< QUrl > &  src,
const QUrl dest,
JobFlags  flags = DefaultFlags 
)

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

Parameters
srcthe list of files and/or directories
destthe destination
flagscopy() supports HideProgressInfo and Overwrite. Note: Overwrite has the meaning of both "write into existing directories" and "overwrite existing files". However if "dest" exists, then src is copied into a subdir of dest, just like "cp" does.
Returns
the job handling the operation

Definition at line 2643 of file copyjob.cpp.

◆ copy() [2/2]

CopyJob * KIO::copy ( const QUrl src,
const QUrl dest,
JobFlags  flags = DefaultFlags 
)

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
srcthe file or directory to copy
destthe destination
flagscopy() supports HideProgressInfo and Overwrite. Note: Overwrite has the meaning of both "write into existing directories" and "overwrite existing files". However if "dest" exists, then src is copied into a subdir of dest, just like "cp" does. Use copyAs if you don't want that.
Returns
the job handling the operation
See also
copyAs()

Definition at line 2627 of file copyjob.cpp.

◆ copyAs()

CopyJob * KIO::copyAs ( const QUrl src,
const QUrl dest,
JobFlags  flags = DefaultFlags 
)

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 (or writing the contents of src into dest, when using Overwrite).

Parameters
srcthe file or directory to copy
destthe destination
flagscopyAs() supports HideProgressInfo and Overwrite. Note: Overwrite has the meaning of both "write into existing directories" and "overwrite existing files".
  • Returns
    the job handling the operation

Definition at line 2635 of file copyjob.cpp.

◆ createDefaultJobUiDelegate() [1/2]

KJobUiDelegate * KIO::createDefaultJobUiDelegate ( )

Convenience method: use default factory, if there's one, to create a delegate and return it.

Definition at line 23 of file jobuidelegatefactory.cpp.

◆ createDefaultJobUiDelegate() [2/2]

KJobUiDelegate * KIO::createDefaultJobUiDelegate ( KJobUiDelegate::Flags  flags,
QWidget window 
)

Convenience method: use default factory, if there's one, to create a delegate and return it.

Since
5.98

Definition at line 28 of file jobuidelegatefactory.cpp.

◆ davPropFind() [1/2]

DavJob * KIO::davPropFind ( const QUrl url,
const QDomDocument properties,
const QString depth,
JobFlags  flags = DefaultFlags 
)

Creates a new DavJob that issues a PROPFIND command.

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

Parameters
urlthe URL of the resource
propertiesa propfind document that describes the properties that should be retrieved
depththe depth of the request. Can be "0", "1" or "infinity"
flagsWe support HideProgressInfo here
Returns
the new DavJob
Deprecated:
since 5.84, use the overload taking a QString properties argument instead. This can typically be done by replacing the properties argument with properties.toString().

Definition at line 144 of file davjob.cpp.

◆ davPropFind() [2/2]

DavJob * KIO::davPropFind ( const QUrl url,
const QString properties,
const QString depth,
JobFlags  flags = DefaultFlags 
)

Creates a new DavJob that issues a PROPFIND command.

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

Parameters
urlthe URL of the resource
propertiesa propfind document that describes the properties that should be retrieved
depththe depth of the request. Can be "0", "1" or "infinity"
flagsWe support HideProgressInfo here
Returns
the new DavJob
Since
5.84

Definition at line 131 of file davjob.cpp.

◆ davPropPatch() [1/2]

DavJob * KIO::davPropPatch ( const QUrl url,
const QDomDocument properties,
JobFlags  flags = DefaultFlags 
)

Creates a new DavJob that issues a PROPPATCH command.

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

Parameters
urlthe URL of the resource
propertiesa PROPPACTCH document that describes the properties that should be modified and its new values
flagsWe support HideProgressInfo here
Returns
the new DavJob
Deprecated:
since 5.84, use the overload taking a QString properties argument instead. This can typically be done by replacing the properties argument with properties.toString().

Definition at line 151 of file davjob.cpp.

◆ davPropPatch() [2/2]

DavJob * KIO::davPropPatch ( const QUrl url,
const QString properties,
JobFlags  flags = DefaultFlags 
)

Creates a new DavJob that issues a PROPPATCH command.

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

Parameters
urlthe URL of the resource
propertiesa PROPPACTCH document that describes the properties that should be modified and its new values
flagsWe support HideProgressInfo here
Returns
the new DavJob
Since
5.84

Definition at line 138 of file davjob.cpp.

◆ davReport()

DavJob * KIO::davReport ( const QUrl url,
const QString report,
const QString depth,
JobFlags  flags = DefaultFlags 
)

Creates a new DavJob that issues a REPORT command.

Parameters
urlthe URL of the resource
reporta REPORT document that describes the request to make
depththe depth of the request. Can be "0", "1" or "infinity"
flagsWe support HideProgressInfo here
Returns
the new DavJob
Since
4.4

Definition at line 169 of file davjob.cpp.

◆ davSearch()

DavJob * KIO::davSearch ( const QUrl url,
const QString nsURI,
const QString qName,
const QString query,
JobFlags  flags = DefaultFlags 
)

Creates a new DavJob that issues a SEARCH command.

Parameters
urlthe URL of the resource
nsURIthe URI of the search method's qualified name
qNamethe local part of the search method's qualified name
querythe search string
flagsWe support HideProgressInfo here
Returns
the new DavJob

Definition at line 157 of file davjob.cpp.

◆ decodeFileName()

KIOCORE_EXPORT QString KIO::decodeFileName ( const QString str)

Decodes (from the filename to the text displayed) This doesn't do anything anymore, it used to do the opposite of encodeFileName when encodeFileName was using %2F for '/'.

Parameters
strthe file name to decode
Returns
the decoded file name

Definition at line 146 of file global.cpp.

◆ defaultJobUiDelegateExtension()

JobUiDelegateExtension * KIO::defaultJobUiDelegateExtension ( )

Returns the default job UI delegate extension to be used by all KIO jobs (in which HideProgressInfo is not set) Can return nullptr, if no kio GUI library is loaded.

Since
5.0

Definition at line 32 of file jobuidelegateextension.cpp.

◆ defaultJobUiDelegateFactory()

JobUiDelegateFactory * KIO::defaultJobUiDelegateFactory ( )

Returns the default job UI delegate factory to be used by all KIO jobs (in which HideProgressInfo is not set) Can return nullptr, if no kio GUI library is loaded.

Since
5.0
Deprecated:
Since 5.98, use defaultJobUiDelegateFactoryV2 instead.

Definition at line 34 of file jobuidelegatefactory.cpp.

◆ defaultJobUiDelegateFactoryV2()

JobUiDelegateFactoryV2 * KIO::defaultJobUiDelegateFactoryV2 ( )

Returns the default job UI delegate factory to be used by all KIO jobs (in which HideProgressInfo is not set) Can return nullptr, if no kio GUI library is loaded.

Since
5.98

Definition at line 40 of file jobuidelegatefactory.cpp.

◆ del() [1/2]

DeleteJob * KIO::del ( const QList< QUrl > &  src,
JobFlags  flags = DefaultFlags 
)

Deletes a list of files or directories.

Parameters
srcthe files to delete
flagsWe support HideProgressInfo here
Returns
the job handling the operation

Definition at line 612 of file deletejob.cpp.

◆ del() [2/2]

DeleteJob * KIO::del ( const QUrl src,
JobFlags  flags = DefaultFlags 
)

Delete a file or directory.

Parameters
srcfile to delete
flagsWe support HideProgressInfo here
Returns
the job handling the operation

Definition at line 601 of file deletejob.cpp.

◆ delegateExtension()

template<typename T >
T KIO::delegateExtension ( KJob job)
inline

Returns the child of the job's uiDelegate() that implements the given extension, or nullptr if none was found (or if the job had no uiDelegate).

Since
5.78

Definition at line 118 of file jobuidelegatefactory.h.

◆ detailsToStatDetails()

KIO::StatDetails KIO::detailsToStatDetails ( int  details)

Converts the legacy stat details int to a StatDetail Flag.

Parameters
details
See also
setDetails()
Since
5.69
Deprecated:
since 5.69, use directly KIO::StatDetails

Definition at line 99 of file statjob.cpp.

◆ directorySize() [1/2]

DirectorySizeJob * KIO::directorySize ( const KFileItemList lstItems)

Computes a directory size (by doing a recursive listing).

Connect to the result signal (this is the preferred solution to avoid blocking the GUI), or use exec() for a synchronous (blocking) calculation.

This one lists the items from lstItems. The reason we asks for items instead of just urls, is so that we directly know if the item is a file or a directory, and in case of a file, we already have its size.

Definition at line 200 of file directorysizejob.cpp.

◆ directorySize() [2/2]

DirectorySizeJob * KIO::directorySize ( const QUrl directory)

Computes a directory size (by doing a recursive listing).

Connect to the result signal (this is the preferred solution to avoid blocking the GUI), or use exec() for a synchronous (blocking) calculation.

This one lists a single directory.

Definition at line 194 of file directorysizejob.cpp.

◆ drop() [1/2]

DropJob * KIO::drop ( const QDropEvent dropEvent,
const QUrl destUrl,
DropJobFlags  dropjobFlags,
JobFlags  flags = DefaultFlags 
)

Similar to KIO::drop.

Parameters
dropEventthe drop event, from which the job will extract mimeData, dropAction, etc. The application should take care of calling dropEvent->acceptProposedAction().
destUrlThe URL of the target file or directory
dropjobFlagsShow the menu immediately or manually.
flagspassed to the sub job
Returns
A pointer to the job handling the operation.
Warning
Don't forget to call DropJob::showMenu on this job, otherwise the popup will never be shown
Since
5.67

Definition at line 645 of file dropjob.cpp.

◆ drop() [2/2]

DropJob * KIO::drop ( const QDropEvent dropEvent,
const QUrl destUrl,
JobFlags  flags = DefaultFlags 
)

Drops the clipboard contents.

If the mime data contains URLs, a popup appears to choose between Move, Copy, Link and Cancel which is then implemented by the job, using KIO::move, KIO::copy or KIO::link Additional actions provided by the application or by plugins can be shown in the popup.

If the mime data contains data other than URLs, it is saved into a file after asking the user to choose a filename and the preferred data format.

This job takes care of recording the subjob in the FileUndoManager, and emits itemCreated for every file or directory being created, so that the view can select these items.

Parameters
dropEventthe drop event, from which the job will extract mimeData, dropAction, etc. The application should take care of calling dropEvent->acceptProposedAction().
destUrlThe URL of the target file or directory
flagspassed to the sub job
Returns
A pointer to the job handling the operation.
Warning
Don't forget to call KJobWidgets::setWindow() on this job, otherwise the popup menu won't be properly positioned with Wayland compositors.
Since
5.4

Definition at line 640 of file dropjob.cpp.

◆ emptyTrash()

KIO::EmptyTrashJob * KIO::emptyTrash ( )

Empties the trash.

Returns
A pointer to the job handling the operation.
Since
5.2

Definition at line 48 of file emptytrashjob.cpp.

◆ encodeFileName()

KIOCORE_EXPORT QString KIO::encodeFileName ( const QString str)

Encodes (from the text displayed to the real filename) This translates '/' into a "unicode fraction slash", QChar(0x2044).

Used by KIO::link, for instance.

Parameters
strthe file name to encode
Returns
the encoded file name

Definition at line 139 of file global.cpp.

◆ favIconForUrl()

QString KIO::favIconForUrl ( const QUrl url)

Return the "favicon" (see http://www.favicon.com) for the given url, if available.

Does NOT attempt to download the favicon, it only returns one that is already available.

If unavailable, returns QString(). Use KIO::FavIconRequestJob instead of this method if you can wait for the favicon to be downloaded.

Parameters
urlthe URL of the favicon
Returns
the path to the icon (to be passed to QIcon()), or QString()
Since
5.0

Definition at line 203 of file global.cpp.

◆ file_copy() [1/2]

FileCopyJob * KIO::file_copy ( const QUrl src,
const QUrl dest,
int  permissions = -1,
JobFlags  flags = DefaultFlags 
)

Copy a single file.

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

Parameters
srcWhere to get the file
destWhere to put the file
permissionsthe file mode permissions to set on dest; if this is -1 (the default) no special permissions will be set on dest, i.e. it'll have the default system permissions for newly created files, and the owner and group permissions are not preserved.
flagsCan be JobFlag::HideProgressInfo, Overwrite and Resume here WARNING: Setting JobFlag::Resume means that the data will be appended to dest if dest exists
Returns
the job handling the operation

Definition at line 639 of file filecopyjob.cpp.

◆ file_copy() [2/2]

FileCopyJob* KIO::file_copy ( const QUrl src,
const QUrl dest,
JobFlags  flags 
)
delete

Overload for catching code mistakes.

Do NOT call this method (it is not implemented), insert a value for permissions (-1 by default) before the JobFlags.

Since
4.5

◆ file_delete()

SimpleJob * KIO::file_delete ( const QUrl src,
JobFlags  flags = DefaultFlags 
)

Delete a single file.

Parameters
srcFile to delete.
flagsCan be HideProgressInfo here
Returns
the job handling the operation.

Definition at line 380 of file job.cpp.

◆ file_move() [1/2]

FileCopyJob * KIO::file_move ( const QUrl src,
const QUrl dest,
int  permissions = -1,
JobFlags  flags = DefaultFlags 
)

Move a single file.

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

Parameters
srcWhere to get the file
destWhere to put the file
permissionsthe file mode permissions to set on dest; if this is -1 (the default), no special permissions are set on dest, i.e. it'll have the default system permissions for newly created files, and the owner and group permissions are not preserved.
flagsCan be HideProgressInfo, Overwrite and Resume here WARNING: Setting JobFlag::Resume means that the data will be appended to dest if dest exists
Returns
the job handling the operation

Definition at line 644 of file filecopyjob.cpp.

◆ file_move() [2/2]

FileCopyJob* KIO::file_move ( const QUrl src,
const QUrl dest,
JobFlags  flags 
)
delete

Overload for catching code mistakes.

Do NOT call this method (it is not implemented), insert a value for permissions (-1 by default) before the JobFlags.

Since
4.3

◆ filePreview() [1/3]

PreviewJob * KIO::filePreview ( const KFileItemList items,
const QSize size,
const QStringList enabledPlugins = nullptr 
)

Creates a PreviewJob to generate a preview image for the given items.

Parameters
itemsList of files to create previews for.
sizeDesired size of the preview.
enabledPluginsIf non-zero it defines the list of plugins that are considered for generating the preview. If enabledPlugins is zero the plugins specified in the KConfigGroup "PreviewSettings" are used.
Since
4.7

Definition at line 1075 of file previewjob.cpp.

◆ filePreview() [2/3]

PreviewJob * KIO::filePreview ( const KFileItemList items,
int  width,
int  height = 0,
int  iconSize = 0,
int  iconAlpha = 70,
bool  scale = true,
bool  save = true,
const QStringList enabledPlugins = nullptr 
)

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

Parameters
itemsfiles to get previews for
widththe maximum width to use
heightthe maximum height to use, if this is 0, the same value as width is used.
iconSizethe size of the MIME type 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.
iconAlphatransparency to use for the icon overlay
scaleif the image is to be scaled to the requested size or returned in its original size
saveif the image should be cached for later use
enabledPluginsif non-zero, this points to a list containing the names of the plugins that may be used.
Returns
the new PreviewJob
See also
PreviewJob::availablePlugins()
Deprecated:
Since 4.7, use KIO::filePreview(const KFileItemList&, const QSize&, const QStringList*) in combination with the setter-methods instead. Note that the semantics of enabledPlugins has been slightly changed.

Definition at line 1055 of file previewjob.cpp.

◆ filePreview() [3/3]

PreviewJob * KIO::filePreview ( const QList< QUrl > &  items,
int  width,
int  height = 0,
int  iconSize = 0,
int  iconAlpha = 70,
bool  scale = true,
bool  save = true,
const QStringList enabledPlugins = nullptr 
)

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

Parameters
itemsfiles to get previews for
widththe maximum width to use
heightthe maximum height to use, if this is 0, the same value as width is used.
iconSizethe size of the MIME type 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.
iconAlphatransparency to use for the icon overlay
scaleif the image is to be scaled to the requested size or returned in its original size
saveif the image should be cached for later use
enabledPluginsif non-zero, this points to a list containing the names of the plugins that may be used.
Returns
the new PreviewJob
See also
PreviewJob::availablePlugins()
Deprecated:
Since 4.7, use KIO::filePreview(const KFileItemList&, const QSize&, const QStringList*) in combination with the setter-methods instead. Note that the semantics of enabledPlugins has been slightly changed.

Definition at line 1063 of file previewjob.cpp.

◆ fileSystemFreeSpace()

KIO::FileSystemFreeSpaceJob * KIO::fileSystemFreeSpace ( const QUrl url)

Get a filesystem's total and available space.

Parameters
urlUrl to the filesystem.
Returns
the job handling the operation.

Definition at line 73 of file filesystemfreespacejob.cpp.

◆ get()

TransferJob * KIO::get ( const QUrl url,
LoadType  reload = NoReload,
JobFlags  flags = DefaultFlags 
)

Get (means: read).

This is the job to use in order to "download" a file into memory. The worker emits the data through the data() signal.

Special case: if you want to determine the MIME type of the file first, and then read it with the appropriate component, you can still use a KIO::get() directly. When that job emits the mimeType signal, (which is guaranteed to happen before it emits any data), put the job on hold:

and forget about the job. The next time someone does a KIO::get() on the same URL (even in another process) this job will be resumed. This saves KIO from doing two requests to the server.

Parameters
urlthe URL of the file
reloadReload to reload the file, NoReload if it can be taken from the cache
flagsCan be HideProgressInfo here
Returns
the job handling the operation.

Definition at line 471 of file transferjob.cpp.

◆ getCacheControlString()

QString KIO::getCacheControlString ( KIO::CacheControl  cacheControl)

Returns a string representation of the given cache control method.

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

Definition at line 182 of file global.cpp.

◆ getJobTracker()

KJobTrackerInterface * KIO::getJobTracker ( )

Returns the job tracker to be used by all KIO jobs (in which HideProgressInfo is not set)

Definition at line 14 of file jobtracker.cpp.

◆ highlightInFileManager()

KIOWIDGETS_EXPORT OpenFileManagerWindowJob * KIO::highlightInFileManager ( const QList< QUrl > &  urls,
const QByteArray asn = QByteArray() 
)

Convenience method for creating a job to highlight a certain file or folder.

It will create a job for a given URL(s) and automatically start it.

Since
5.24

Definition at line 105 of file openfilemanagerwindowjob.cpp.

◆ http_delete()

TransferJob * KIO::http_delete ( const QUrl url,
JobFlags  flags = DefaultFlags 
)

HTTP DELETE.

Though this function servers the same purpose as KIO::file_delete, unlike file_delete it accommodates HTTP specific actions such as redirections.

Parameters
urlurl resource to delete.
flagsCan be HideProgressInfo here
Returns
the job handling the operation.
Since
4.7.3

Definition at line 387 of file storedtransferjob.cpp.

◆ http_post() [1/2]

TransferJob * KIO::http_post ( const QUrl url,
const QByteArray postData,
JobFlags  flags = DefaultFlags 
)

HTTP POST (for form data).

Example:

job = KIO::http_post( url, postData, KIO::HideProgressInfo );
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
urlWhere to write the data.
postDataEncoded data to post.
flagsCan be HideProgressInfo here
Returns
the job handling the operation.

Definition at line 326 of file storedtransferjob.cpp.

◆ http_post() [2/2]

TransferJob * KIO::http_post ( const QUrl url,
QIODevice device,
qint64  size = -1,
JobFlags  flags = DefaultFlags 
)

HTTP POST.

This function, unlike the one that accepts a QByteArray, accepts an IO device from which to read the encoded data to be posted to the server in order to to avoid holding the content of very large post requests, e.g. multimedia file uploads, in memory.

Parameters
urlWhere to write the data.
devicethe device to read from
sizeSize of the encoded post data.
flagsCan be HideProgressInfo here
Returns
the job handling the operation.
Since
4.7

Definition at line 353 of file storedtransferjob.cpp.

◆ http_update_cache()

SimpleJob * KIO::http_update_cache ( const QUrl url,
bool  no_cache,
const QDateTime expireDate 
)

HTTP cache update.

Parameters
urlUrl to update, protocol must be "http".
no_cacheIf true, cache entry for url is deleted.
expireDateLocal machine time indicating when the entry is supposed to expire.
Returns
the job handling the operation.

Definition at line 405 of file simplejob.cpp.

◆ iconNameForUrl()

QString KIO::iconNameForUrl ( const QUrl url)

Return the icon name for a URL.

Most of the time this returns the MIME type icon, but also has fallback to favicon and protocol-specific icon.

Pass this to QIcon::fromTheme().

Since
5.0

Definition at line 212 of file global.cpp.

◆ isClipboardDataCut()

KIOWIDGETS_EXPORT bool KIO::isClipboardDataCut ( const QMimeData mimeData)

Returns true if the URLs in mimeData were cut by the user.

This should be called when pasting, to choose between moving and copying.

Since
5.2

Definition at line 358 of file paste.cpp.

◆ itemsSummaryString()

KIOCORE_EXPORT QString KIO::itemsSummaryString ( uint  items,
uint  files,
uint  dirs,
KIO::filesize_t  size,
bool  showSize 
)

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

Parameters
itemsthe number of items (= files + dirs + number of symlinks :)
filesthe number of files
dirsthe number of dirs
sizethe sum of the size of the files
showSizewhether to show the size in the result
Returns
the summary string

Definition at line 113 of file global.cpp.

◆ link() [1/2]

CopyJob * KIO::link ( const QList< QUrl > &  src,
const QUrl destDir,
JobFlags  flags = DefaultFlags 
)

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
srcThe existing files or directories, 'targets' of the link.
destDirDestination directory where the links will be created.
flagslink() supports HideProgressInfo only
Returns
the job handling the operation
See also
link()

Definition at line 2690 of file copyjob.cpp.

◆ link() [2/2]

CopyJob * KIO::link ( const QUrl src,
const QUrl destDir,
JobFlags  flags = DefaultFlags 
)

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
srcThe existing file or directory, 'target' of the link.
destDirDestination directory where the link will be created.
flagslink() supports HideProgressInfo only
Returns
the job handling the operation

Definition at line 2683 of file copyjob.cpp.

◆ linkAs()

CopyJob * KIO::linkAs ( const QUrl src,
const QUrl dest,
JobFlags  flags = DefaultFlags 
)

Create a link.

Unlike link() this operation will fail when dest is an existing directory rather than the final name for the 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
srcThe existing file or directory, 'target' of the link.
destDestination (i.e. the final symlink)
flagslinkAs() supports HideProgressInfo only
Returns
the job handling the operation
See also
link ()
copyAs()

Definition at line 2695 of file copyjob.cpp.

◆ listDir()

ListJob * KIO::listDir ( const QUrl url,
JobFlags  flags = DefaultFlags,
bool  includeHidden = true 
)

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

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

Parameters
urlthe url of the directory
flagsCan be HideProgressInfo here
includeHiddentrue for all files, false to cull out UNIX hidden files/dirs (whose names start with dot)
Returns
the job handling the operation.

Definition at line 243 of file listjob.cpp.

◆ listRecursive()

ListJob * KIO::listRecursive ( const QUrl url,
JobFlags  flags = DefaultFlags,
bool  includeHidden = true 
)

The same as the previous method, but recurses subdirectories.

Directory links are not followed.

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

Parameters
urlthe url of the directory
flagsCan be HideProgressInfo here
includeHiddentrue for all files, false to cull out UNIX hidden files/dirs (whose names start with dot)
Returns
the job handling the operation.

Definition at line 248 of file listjob.cpp.

◆ mimetype()

MimetypeJob * KIO::mimetype ( const QUrl url,
JobFlags  flags = DefaultFlags 
)

Find MIME type for one file or directory.

If you are going to download the file right after determining its MIME type, then don't use this, prefer using a KIO::get() job instead. See the note about putting the job on hold once the MIME type is determined.

Parameters
urlthe URL of the file
flagsCan be HideProgressInfo here
Returns
the job handling the operation.

Definition at line 85 of file mimetypejob.cpp.

◆ mkdir()

KIO::MkdirJob * KIO::mkdir ( const QUrl url,
int  permissions = -1 
)

Creates a single directory.

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

Definition at line 110 of file mkdirjob.cpp.

◆ mkpath()

MkpathJob * KIO::mkpath ( const QUrl url,
const QUrl baseUrl = QUrl(),
KIO::JobFlags  flags = DefaultFlags 
)

Creates a directory, creating parent directories as needed.

Unlike KIO::mkdir(), the job will succeed if the directory exists already.

Parameters
urlThe URL of the directory to create.
baseUrlOptionally, the URL to start from, which is known to exist (e.g. the directory currently listed).
flagsmkpath() supports HideProgressInfo.

If baseUrl is not an ancestor of url, baseUrl will be ignored.

Returns
A pointer to the job handling the operation.
Since
5.4

Definition at line 148 of file mkpathjob.cpp.

◆ mostLocalUrl()

StatJob * KIO::mostLocalUrl ( const QUrl url,
JobFlags  flags = DefaultFlags 
)

Tries to map a local URL for the given URL, using a KIO job.

This only makes sense for protocols that have Class ":local" (such protocols most likely have KIO workers that set UDSEntry::UDS_LOCAL_PATH); ideally you should check the URL protocol Class before creating a StatJob. See KProtocolInfo::protocolClass().

Starts a (stat) job for determining the "most local URL" for a given URL. Retrieve the result with StatJob::mostLocalUrl in the result slot.

Parameters
urlThe URL we are stat'ing.
Since
4.4

Sample usage:

Here the KIO worker name is "foo", which for example could be:

  • "desktop", "fonts", "kdeconnect", these have class ":local"
  • "ftp", "sftp", "smb", these have class ":internet"
QUrl url(QStringLiteral("foo://bar/");
if (url.isLocalFile()) { // If it's a local URL, there is no need to stat
[...]
} else if (KProtocolInfo::protocolClass(url.scheme()) == QLatin1String(":local")) {
// Not a local URL, but if the protocol class is ":local", we may be able to stat
// and get a "most local URL"
auto *job = KIO::mostLocalUrl(url);
job->uiDelegate()->setWindow(this);
connect(job, &KJob::result, this, &MyClass::slotMostLocalUrlResult);
[...]
// And in slotMostLocalUrlResult(KJob *job)
if (job->error()) {
[...] // Doesn't exist, ideally show an error message
} else {
const QUrl localUrl = job->mostLocalUrl();
// localUrl = file:///local/path/to/bar/
[...]
}
}

Definition at line 241 of file statjob.cpp.

◆ mount()

SimpleJob * KIO::mount ( bool  ro,
const QByteArray fstype,
const QString dev,
const QString point,
JobFlags  flags = DefaultFlags 
)

Mount filesystem.

Special job for kio_file.

Parameters
roMount read-only if true.
fstypeFile system type (e.g. "ext2", can be empty).
devDevice (e.g. /dev/sda0).
pointMount point, can be null.
flagsCan be HideProgressInfo here
Returns
the job handling the operation.

Definition at line 383 of file simplejob.cpp.

◆ move() [1/2]

CopyJob * KIO::move ( const QList< QUrl > &  src,
const QUrl dest,
JobFlags  flags = DefaultFlags 
)

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

Parameters
srcthe list of files or directories to copy
destthe destination
flagsmove() supports HideProgressInfo and Overwrite. Note: Overwrite has the meaning of both "write into existing directories" and "overwrite existing files". However if "dest" exists, then src is copied into a subdir of dest, just like "cp" does.
Returns
the job handling the operation
See also
copy()

Definition at line 2673 of file copyjob.cpp.

◆ move() [2/2]

CopyJob * KIO::move ( const QUrl src,
const QUrl dest,
JobFlags  flags = DefaultFlags 
)

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

Parameters
srcthe file or directory to copy
destthe destination
flagsmove() supports HideProgressInfo and Overwrite. Note: Overwrite has the meaning of both "write into existing directories" and "overwrite existing files". However if "dest" exists, then src is copied into a subdir of dest, just like "cp" does.
Returns
the job handling the operation
See also
copy()
moveAs()

Definition at line 2649 of file copyjob.cpp.

◆ moveAs()

CopyJob * KIO::moveAs ( const QUrl src,
const QUrl dest,
JobFlags  flags = DefaultFlags 
)

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

Unlike move() this operation will not move src into dest when dest exists: it will either fail, or move the contents of src into it if Overwrite is set.

Parameters
srcthe file or directory to copy
destthe destination
flagsmoveAs() supports HideProgressInfo and Overwrite. Note: Overwrite has the meaning of both "write into existing directories" and "overwrite existing files".
Returns
the job handling the operation
See also
copyAs()

Definition at line 2661 of file copyjob.cpp.

◆ multi_get()

MultiGetJob * KIO::multi_get ( long  id,
const QUrl url,
const MetaData metaData 
)

Creates a new multiple get job.

Parameters
idthe id of the get operation
urlthe URL of the file
metaDatathe MetaData associated with the file
Returns
the job handling the operation.
See also
get()

Definition at line 245 of file multigetjob.cpp.

◆ number()

KIOCORE_EXPORT QString KIO::number ( KIO::filesize_t  size)

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

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

Definition at line 55 of file global.cpp.

◆ open()

FileJob * KIO::open ( const QUrl url,
QIODevice::OpenMode  mode 
)

Open ( random access I/O )

The file-job emits open() when opened

On error the open() signal is not emitted. To catch errors please connect to the result() signal.

Parameters
urlthe URL of the file
modethe access privileges: see OpenMode
Returns
The file-handling job. It will never return 0. Errors are handled asynchronously (emitted as signals).

Definition at line 246 of file filejob.cpp.

◆ parseCacheControl()

KIO::CacheControl KIO::parseCacheControl ( const QString cacheControl)

Parses the string representation of the cache control option.

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

Definition at line 158 of file global.cpp.

◆ paste()

PasteJob * KIO::paste ( const QMimeData mimeData,
const QUrl destDir,
JobFlags  flags = DefaultFlags 
)

Pastes the clipboard contents.

If the clipboard contains URLs, they are copied (or moved) to the destination URL, using a KIO::CopyJob subjob. Otherwise, the data from the clipboard is saved into a file using KIO::storedPut, after asking the user to choose a filename and the preferred data format.

This takes care of recording the subjob in the FileUndoManager, and emits itemCreated for every file or directory being created, so that the view can select these items.

Parameters
mimeDatathe MIME data to paste, usually QApplication::clipboard()->mimeData()
destDirThe URL of the target directory
flagspassed to the sub job
Returns
A pointer to the job handling the operation.
Since
5.4

Definition at line 100 of file pastejob.cpp.

◆ pasteActionText() [1/2]

QString KIO::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 QAction::setText, or an empty string if pasting isn't possible right now.
Deprecated:
since 5.4, use pasteActionText(const QMimeData *, bool*, const KFileItem &)

Definition at line 285 of file paste.cpp.

◆ pasteActionText() [2/2]

KIOWIDGETS_EXPORT QString KIO::pasteActionText ( const QMimeData mimeData,
bool *  enable,
const KFileItem destItem 
)

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

Parameters
mimeDatathe mime data, usually QApplication::clipboard()->mimeData().
enableoutput parameter, to be passed to QAction::setEnabled. The pointer must be non-null, and in return the function will always set its value.
destItemitem representing the directory into which the clipboard data or items would be pasted. Used to find out about permissions in that directory.
Returns
a string suitable for QAction::setText
Since
5.4

Definition at line 303 of file paste.cpp.

◆ pasteClipboard()

KIOWIDGETS_EXPORT KIO::Job * KIO::pasteClipboard ( const QUrl destURL,
QWidget widget,
bool  move = false 
)

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

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

Parameters
destURLthe URL to receive the data
widgetparent widget to use for dialogs
movetrue to move the data, false to copy – now ignored and handled automatically
Returns
the job that handles the operation
Deprecated:
since 5.4, use KIO::paste() from <KIO/PasteJob> (which takes care of undo/redo too)

Definition at line 257 of file paste.cpp.

◆ pasteMimeData()

KIOWIDGETS_EXPORT KIO::Job * KIO::pasteMimeData ( const QMimeData data,
const QUrl destUrl,
const QString dialogText,
QWidget widget 
)

Save the given mime 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 dolphin and konqueror.

Parameters
datathe QMimeData, usually from a QDropEvent
destUrlthe URL of the directory where the data will be pasted. The filename to use in that directory is prompted by this method.
dialogTextthe text to show in the dialog
widgetparent widget to use for dialogs
See also
pasteClipboard()
Deprecated:
since 5.4, use KIO::paste() from <KIO/PasteJob> (which takes care of undo/redo too)

Definition at line 346 of file paste.cpp.

◆ pixmapForUrl()

QPixmap KIO::pixmapForUrl ( const QUrl url,
int  dummy = 0,
KIconLoader::Group  group = KIconLoader::Desktop,
int  force_size = 0,
int  state = 0,
QString path = nullptr 
)

Convenience method to find the pixmap for a URL.

Call this one when you don't know the MIME type.

Parameters
urlURL for the file.
dummyignored (was a mode_t parameter in kdelibs 4)
groupThe icon group where the icon is going to be used.
force_sizeOverride globally configured icon size. Use 0 for the default size
stateThe icon state, one of: KIconLoader::DefaultState, KIconLoader::ActiveState or KIconLoader::DisabledState.
pathOutput parameter to get the full path. Seldom needed. Ignored if null pointer.
Returns
the pixmap of the URL, can be a default icon if not found
Deprecated:
since 5.75, use KIO::iconNameForUrl() to get the icon name and QIcon::fromTheme(name, QIcon::fromTheme(QStringLiteral("application-octet-stream")))

Definition at line 13 of file pixmaploader.cpp.

◆ put()

TransferJob * KIO::put ( const QUrl url,
int  permissions,
JobFlags  flags = DefaultFlags 
)

Put (means: write)

Parameters
urlWhere to write data.
permissionsMay be -1. In this case no special permission mode is set.
flagsCan be HideProgressInfo, Overwrite and Resume here. WARNING: Setting Resume means that the data will be appended to dest if dest exists.
Returns
the job handling the operation.
See also
multi_get()

Definition at line 449 of file storedtransferjob.cpp.

◆ rawErrorDetail()

KIOCORE_EXPORT QByteArray KIO::rawErrorDetail ( int  errorCode,
const QString errorText,
const QUrl reqUrl = nullptr,
int  method = -1 
)

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

Parameters
errorCodethe error code
errorTextthe additional error text
reqUrlthe request URL
methodthe KIO worker method
Returns
the following data:
  • QString errorName - the name of the error
  • QString techName - if not null, the more technical name of the error
  • QString description - a description of the error
  • QStringList causes - a list of possible causes of the error
  • QStringList solutions - a liso of solutions for the error

Definition at line 322 of file job_error.cpp.

◆ rename()

SimpleJob * KIO::rename ( const QUrl src,
const QUrl dest,
JobFlags  flags = DefaultFlags 
)

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
srcThe original URL
destThe final URL
flagsCan be Overwrite here
Returns
the job handling the operation.

Definition at line 363 of file simplejob.cpp.

◆ restoreFromTrash()

RestoreJob * KIO::restoreFromTrash ( const QList< QUrl > &  urls,
JobFlags  flags = DefaultFlags 
)

Restore a set of trashed files or directories.

Since
5.2
Parameters
urlsthe trash:/ URLs to restore. The trash implementation will know where the files came from and will restore them to their original location.
flagsrestoreFromTrash() supports HideProgressInfo.
Returns
the job handling the operation

Definition at line 101 of file restorejob.cpp.

◆ rmdir()

SimpleJob * KIO::rmdir ( const QUrl url)

Removes a single directory.

The directory is assumed to be empty. The job will fail if the directory is not empty. Use KIO::del() (DeleteJob) to delete non-empty directories.

Parameters
urlThe URL of the directory to remove.
Returns
A pointer to the job handling the operation.

Definition at line 336 of file simplejob.cpp.

◆ setClipboardDataCut()

KIOWIDGETS_EXPORT void KIO::setClipboardDataCut ( QMimeData mimeData,
bool  cut 
)

Add the information whether the files were cut, into the mimedata.

Parameters
mimeDatapointer to the mimeData object to be populated. Must not be null.
cutif true, the user selected "cut" (saved as application/x-kde-cutselection in the mimedata).
Since
5.2

Definition at line 352 of file paste.cpp.

◆ setDefaultJobUiDelegateExtension()

void KIO::setDefaultJobUiDelegateExtension ( JobUiDelegateExtension extension)

Internal.

Allows the KIO widgets library to register its widget-based job UI delegate extension automatically.

Since
5.0

Definition at line 37 of file jobuidelegateextension.cpp.

◆ setDefaultJobUiDelegateFactory()

void KIO::setDefaultJobUiDelegateFactory ( JobUiDelegateFactory factory)

Internal.

Allows the KIO widgets library to register its widget-based job UI delegate factory automatically.

Since
5.0
Deprecated:
Since 5.98, use setDefaultJobUiDelegateFactoryV2

Definition at line 46 of file jobuidelegatefactory.cpp.

◆ setDefaultJobUiDelegateFactoryV2()

void KIO::setDefaultJobUiDelegateFactoryV2 ( JobUiDelegateFactoryV2 *  factory)

Internal.

Allows the KIO widgets library to register its widget-based job UI delegate factory automatically.

Since
5.98

Definition at line 52 of file jobuidelegatefactory.cpp.

◆ setJobTracker()

void KIO::setJobTracker ( KJobTrackerInterface tracker)

Allows the KIO widgets library to register its widget-based job tracker automatically.

Since
5.0

Definition at line 22 of file jobtracker.cpp.

◆ setModificationTime()

SimpleJob * KIO::setModificationTime ( const QUrl url,
const QDateTime mtime 
)

Changes the modification time on a file or directory.

Parameters
urlThe URL of file or directory.
mtimeThe modification time to set.
Returns
the job handling the operation.

Definition at line 356 of file simplejob.cpp.

◆ special()

SimpleJob * KIO::special ( const QUrl url,
const QByteArray data,
JobFlags  flags = DefaultFlags 
)

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

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

Parameters
urlThe URL isn't passed to the worker, but is used to know which worker to send it to :-)
dataPacked data. The meaning is completely dependent on the worker, but usually starts with an int for the command number.
flagsCan be HideProgressInfo here
Returns
the job handling the operation.

Definition at line 377 of file simplejob.cpp.

◆ stat() [1/3]

StatJob * KIO::stat ( const QUrl url,
bool  sideIsSource,
short int  details,
JobFlags  flags = DefaultFlags 
)

Find all details for one file or directory.

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

Parameters
urlthe URL of the file
sideIsSourceis 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 KIO worker 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 worker 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.
detailsselects 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.
flagsCan be HideProgressInfo here
Returns
the job handling the operation.
Deprecated:
Since 4.0, use stat(const QUrl &, KIO::StatJob::StatSide, short int, JobFlags)

Definition at line 252 of file statjob.cpp.

◆ stat() [2/3]

StatJob * KIO::stat ( const QUrl url,
JobFlags  flags = DefaultFlags 
)

Find all details for one file or directory.

Parameters
urlthe URL of the file
flagsCan be HideProgressInfo here
Returns
the job handling the operation.

Definition at line 215 of file statjob.cpp.

◆ stat() [3/3]

StatJob * KIO::stat ( const QUrl url,
KIO::StatJob::StatSide  side,
short int  details,
JobFlags  flags = DefaultFlags 
)

Find all details for one file or directory.

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

Parameters
urlthe URL of the file
sideis SourceSide when stating a source file (we will do a get on it if the stat works) and DestinationSide when stating a destination file (target of a copy). The reason for this parameter is that in some cases the KIO worker 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 worker can't reliably determine the existence of a file, it will:
  • be optimistic if SourceSide, 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 DestinationSide, 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 DestinationSide.
detailsselects 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 a symlink, or it doesn't exist". This is used by KRun and DeleteJob.
flagsCan be HideProgressInfo here
Returns
the job handling the operation.
Deprecated:
since 5.69, use statDetails(const QUrl &, KIO::StatJob::StatSide, KIO::StatDetails, JobFlags)

Definition at line 275 of file statjob.cpp.

◆ statDetails()

StatJob * KIO::statDetails ( const QUrl url,
KIO::StatJob::StatSide  side,
KIO::StatDetails  details = KIO::StatDefaultDetails,
JobFlags  flags = DefaultFlags 
)

Find all details for one file or directory.

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

Parameters
urlthe URL of the file
sideis SourceSide when stating a source file (we will do a get on it if the stat works) and DestinationSide when stating a destination file (target of a copy). The reason for this parameter is that in some cases the KIO worker 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 worker can't reliably determine the existence of a file, it will:
  • be optimistic if SourceSide, 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 DestinationSide, 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 DestinationSide.
detailsselects the level of details we want. You should minimize the detail level for better performance.
flagsCan be HideProgressInfo here
Returns
the job handling the operation.
Since
5.69

Definition at line 263 of file statjob.cpp.

◆ storedGet()

StoredTransferJob * KIO::storedGet ( const QUrl url,
LoadType  reload = NoReload,
JobFlags  flags = DefaultFlags 
)

Get (means: read), into a single QByteArray.

See also
StoredTransferJob
Parameters
urlthe URL of the file
reloadReload to reload the file, NoReload if it can be taken from the cache
flagsCan be HideProgressInfo here
Returns
the job handling the operation.

Definition at line 132 of file storedtransferjob.cpp.

◆ storedHttpPost() [1/2]

StoredTransferJob * KIO::storedHttpPost ( const QByteArray arr,
const QUrl url,
JobFlags  flags = DefaultFlags 
)

HTTP POST (means: write) data from a single QByteArray.

See also
StoredTransferJob
Parameters
arrThe data to write
urlWhere to write data.
flagsCan be HideProgressInfo here.
Returns
the job handling the operation.
Since
4.2

Definition at line 395 of file storedtransferjob.cpp.

◆ storedHttpPost() [2/2]

StoredTransferJob * KIO::storedHttpPost ( QIODevice device,
const QUrl url,
qint64  size = -1,
JobFlags  flags = DefaultFlags 
)

HTTP POST (means: write) data from the given IO device.

See also
StoredTransferJob
Parameters
deviceDevice from which the encoded data to be posted is read. Must be open for reading.
urlWhere to write data.
sizeSize of the encoded data to be posted.
flagsCan be HideProgressInfo here.
Returns
the job handling the operation.
Since
4.7

Definition at line 413 of file storedtransferjob.cpp.

◆ storedPut() [1/2]

StoredTransferJob * KIO::storedPut ( const QByteArray arr,
const QUrl url,
int  permissions,
JobFlags  flags = DefaultFlags 
)

Put (means: write) data from a single QByteArray.

See also
StoredTransferJob
Parameters
arrThe data to write
urlWhere to write data.
permissionsMay be -1. In this case no special permission mode is set.
flagsCan be HideProgressInfo, Overwrite and Resume here. WARNING: Setting Resume means that the data will be appended to dest if dest exists.
Returns
the job handling the operation.

Definition at line 143 of file storedtransferjob.cpp.

◆ storedPut() [2/2]

StoredTransferJob * KIO::storedPut ( QIODevice input,
const QUrl url,
int  permissions,
JobFlags  flags = DefaultFlags 
)

Put (means: write) data from a QIODevice.

See also
StoredTransferJob
Parameters
inputThe data to write, a device to read from. Must be open for reading (data will be read from the current position).
urlWhere to write data.
permissionsMay be -1. In this case no special permission mode is set.
flagsCan be HideProgressInfo, Overwrite and Resume here. WARNING: Setting Resume means that the data will be appended to dest if dest exists.
Returns
the job handling the operation.
Since
5.10

Definition at line 151 of file storedtransferjob.cpp.

◆ suggestName()

QString KIO::suggestName ( const QUrl baseURL,
const QString oldName 
)

Given a directory path and a filename (which usually exists already), this function returns a suggested name for a file that doesn't exist in that directory.

The existence is only checked for local urls though. The suggested file name is of the form "foo 1", "foo 2" etc.

Since
5.0
Deprecated:
since 5.61, use KFileUtils::suggestName() from KCoreAddons

Definition at line 280 of file global.cpp.

◆ symlink()

SimpleJob * KIO::symlink ( const QString target,
const QUrl dest,
JobFlags  flags = DefaultFlags 
)

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 worker does) and it doesn't show rename and skip dialogs - use KIO::link for that.

Parameters
targetThe string that will become the "target" of the link (can be relative)
destThe symlink to create.
flagsCan be Overwrite and HideProgressInfo
Returns
the job handling the operation.

Definition at line 370 of file simplejob.cpp.

◆ trash() [1/2]

CopyJob * KIO::trash ( const QList< QUrl > &  src,
JobFlags  flags = DefaultFlags 
)

Trash a list of files or directories.

This is currently only supported for local files and directories.

Parameters
srcthe files to delete
flagstrash() supports HideProgressInfo only
Returns
the job handling the operation

Definition at line 2709 of file copyjob.cpp.

◆ trash() [2/2]

CopyJob * KIO::trash ( const QUrl src,
JobFlags  flags = DefaultFlags 
)

Trash a file or directory.

This is currently only supported for local files and directories. Use QUrl::fromLocalFile to create a URL from a local file path.

Parameters
srcfile to delete
flagstrash() supports HideProgressInfo only
Returns
the job handling the operation

Definition at line 2702 of file copyjob.cpp.

◆ unmount()

SimpleJob * KIO::unmount ( const QString point,
JobFlags  flags = DefaultFlags 
)

Unmount filesystem.

Special job for kio_file.

Parameters
pointPoint to unmount.
flagsCan be HideProgressInfo here
Returns
the job handling the operation.

Definition at line 393 of file simplejob.cpp.

◆ unsupportedActionErrorString()

KIOCORE_EXPORT QString KIO::unsupportedActionErrorString ( const QString protocol,
int  cmd 
)

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

Parameters
protocolname of the protocol
cmdgiven command
See also
enum Command

Definition at line 874 of file slavebase.cpp.

◆ upUrl()

QUrl KIO::upUrl ( const QUrl url)

This function is useful to implement the "Up" button in a file manager for example.

Returns
a URL that is a level higher
Since
5.0

don't combine with the line below

Definition at line 261 of file global.cpp.

void result(KJob *job)
QString scheme() const const
qulonglong filesize_t
64-bit file size
Definition: global.h:39
bool isDir() const
Definition: udsentry.cpp:386
KJobUiDelegate * uiDelegate() const
@ UDS_NAME
Filename - as displayed in directory listings etc.
Definition: udsentry.h:249
QString stringValue(uint field) const
Definition: udsentry.cpp:376
@ UDS_SIZE
Size of the file.
Definition: udsentry.h:230
static void publishSlaveOnHold()
Send the slave that was put on hold back to KLauncher.
Definition: scheduler.cpp:830
long long numberValue(uint field, long long defaultValue=0) const
Definition: udsentry.cpp:381
QString name(StandardShortcut id)
bool isLocalFile() const const
@ HideProgressInfo
Hide progress information dialog, i.e. don't show a GUI.
Definition: job_base.h:275
int error() const
KIOCORE_EXPORT TransferJob * http_post(const QUrl &url, const QByteArray &postData, JobFlags flags=DefaultFlags)
HTTP POST (for form data).
KIOCORE_EXPORT StatJob * mostLocalUrl(const QUrl &url, JobFlags flags=DefaultFlags)
Tries to map a local URL for the given URL, using a KIO job.
Definition: statjob.cpp:241
const QList< QKeySequence > & end()
static QString protocolClass(const QString &protocol)
Returns the protocol class for the specified protocol.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:54:45 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.