ark
Kerfuffle Namespace Reference
Compresses all input files into an archive. More...
Detailed Description
Compresses all input files into an archive.
This is a job class that creates a compressed archive with all the given input files.
It provides the functionality for the --add command-line option, and does not need the GUI to be running.
Typedef Documentation
| typedef QHash<int, QVariant> Kerfuffle::ArchiveEntry |
| typedef QHash<QString, QVariant> Kerfuffle::CompressionOptions |
| typedef QHash<QString, QVariant> Kerfuffle::ExtractionOptions |
| typedef QHash<int, QVariant> Kerfuffle::ParameterList |
Definition at line 213 of file cliinterface.h.
Enumeration Type Documentation
- Enumerator:
CaptureProgress Bool (default false) Will look for the -sign in the stdout while working, in the form of (2%, 14%, 35%, etc etc), and report progress based upon this.
ListProgram QString The name to the program that will handle listing of this archive (eg "rar").
Will be searched for in PATH
ListArgs QStringList The arguments that are passed to the program above for listing the archive.
Special strings that will be substituted: $Archive - the path of the archive
ExtractProgram QString The name to the program that will handle extracting of this archive (eg "rar").
Will be searched for in PATH
ExtractArgs QStringList The arguments that are passed to the program above for extracting the archive.
Special strings that will be substituted: $Archive - the path of the archive $Files - the files selected to be extracted, if any $PreservePathSwitch - the flag for extracting with full paths $RootNodeSwitch - the internal work dir in the archive (for example when the user has dragged a folder from the archive and wants it extracted relative to it) $PasswordSwitch - the switch setting the password. Note that this will not be inserted unless the listing function has emitted an entry with the IsPasswordProtected property set to true.
NoTrailingSlashes Bool (default false) When passing directories to the extract program, do not include trailing slashes e.g.
if the user selected "foo/" and "foo/bar" in the gui, the paths "foo" and "foo/bar" will be sent to the program.
PreservePathSwitch QStringList This should be a qstringlist with either two elements.
The first string is what PreservePathSwitch in the ExtractArgs will be replaced with if PreservePath is True/enabled. The second is for the disabled case. An empty string means that the argument will not be used in that case. Example: for rar, "x" means extract with full paths, and "e" means extract without full paths. in this case we will use the stringlist ("x", "e"). Or, for another format that might use the switch "--extractFull" for preservePaths, and nothing otherwise: we use the stringlist ("--preservePaths", "")
RootNodeSwitch QStringList (default empty) The format of the root node switch.
The variable $Path will be substituted for the path string. Example: ("--internalPath=$Path) or ("--path", "$Path)
PasswordSwitch QStringList (default empty) The format of the root node switch.
The variable $Password will be substituted for the password string. NOTE: supplying passwords through a virtual terminal is not supported (yet?), because this is not cross platform compatible. As of KDE 4.3 there are no plans to change this. Example: ("-p$Password) or ("--password", "$Password)
FileExistsExpression QString This is a regexp, defining how to recognize a "File already exists" prompt when extracting.
It should have one captured string, which is the filename of the file/folder that already exists.
FileExistsMode int This sets on what output channel the FileExistsExpression regex should be applied on, in other words, on what stream the "file exists" output will appear in.
Values accepted: 0 - Standard error, stderr (default) 1 - Standard output, stdout
FileExistsInput QStringList The various responses that can be supplied as a response to the "file exists" prompt.
The various items are to be supplied in the following order: index 0 - Yes (overwrite) index 1 - No (skip/do not overwrite) index 2 - All (overwrite all) index 3 - Cancel operation index 4 - Do not overwrite any files (autoskip)
DeleteProgram QString The name to the program that will handle deleting of elements in this archive format (eg "rar").
Will be searched for in PATH
DeleteArgs QStringList The arguments that are passed to the program above for deleting from the archive.
Special strings that will be substituted: $Archive - the path of the archive $Files - the files selected to be deleted
ExtractionFailedPatterns QStringList Default: empty A list of regexp patterns that will cause the extraction to exit with a general fail message.
WrongPasswordPatterns QStringList Default: empty A list of regexp patterns that will alert the user that the password was wrong.
AddProgram QString The name to the program that will handle adding in this archive format (eg "rar").
Will be searched for in PATH
AddArgs QStringList The arguments that are passed to the program above for adding to the archive.
Special strings that will be substituted: $Archive - the path of the archive $Files - the files selected to be added
Definition at line 40 of file cliinterface.h.
Meta data related to one entry in a compressed archive.
When creating a plugin, information about every single entry in an archive is contained in an ArchiveEntry, and metadata is set with the entries in this enum.
Please notice that not all archive formats support all the properties below, so set those that are available.
- Enumerator:
Function Documentation
| KERFUFFLE_EXPORT Archive * Kerfuffle::factory | ( | const QString & | filename, | |
| const QString & | fixedMimeType | |||
| ) |
| KERFUFFLE_EXPORT QStringList Kerfuffle::supportedMimeTypes | ( | ) |
| KERFUFFLE_EXPORT QStringList Kerfuffle::supportedWriteMimeTypes | ( | ) |
KDE 4.4 API Reference