• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • kdeutils
  • Sitemap
  • Contact Us
 

ark

Kerfuffle Namespace Reference

Compresses all input files into an archive. More...

Classes

class  AddDialog
class  AddJob
class  AddToArchive
class  Archive
class  ArchiveBase
class  ArchiveObserver
class  BatchExtract
 This class schedules the extraction of all given compressed archives. More...
class  CliInterface
class  DeleteJob
class  ExtractionDialog
class  ExtractJob
class  Job
class  ListJob
class  OverwriteQuery
class  PasswordNeededQuery
class  Query
class  ReadOnlyArchiveInterface
class  ReadWriteArchiveInterface
class  ThreadExecution

Typedefs

typedef QHash< int, QVariant > ArchiveEntry
typedef QHash< QString, QVariant > CompressionOptions
typedef QHash< QString, QVariant > ExtractionOptions
typedef QHash< int, QVariant > ParameterList
typedef QHash< QString, QVariant > QueryData

Enumerations

enum  CliInterfaceParameters {
  CaptureProgress = 0, ListProgram, ListArgs, ExtractProgram,
  ExtractArgs, NoTrailingSlashes, PreservePathSwitch, RootNodeSwitch,
  PasswordSwitch, FileExistsExpression, FileExistsMode, FileExistsInput,
  DeleteProgram, DeleteArgs, ExtractionFailedPatterns, WrongPasswordPatterns,
  AddProgram, AddArgs
}
enum  EntryMetaDataType {
  FileName, InternalID, Permissions, Owner,
  Group, Size, CompressedSize, Link,
  Ratio, CRC, Method, Version,
  Timestamp, IsDirectory, Comment, IsPasswordProtected,
  Custom = 1048576
}

Functions

Archive * factory (const QString &filename, const QString &fixedMimeType)
QStringList supportedMimeTypes ()
QStringList supportedWriteMimeTypes ()

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.

Author:
Harald Hvaal <haraldhv@stud.ntnu.no>

Typedef Documentation

typedef QHash<int, QVariant> Kerfuffle::ArchiveEntry

Definition at line 77 of file archive.h.

typedef QHash<QString, QVariant> Kerfuffle::CompressionOptions

These are the extra options for doing the compression.

Naming convention is CamelCase with either Global, or the compression type (such as Zip, Rar, etc), followed by the property name used

Definition at line 84 of file archive.h.

typedef QHash<QString, QVariant> Kerfuffle::ExtractionOptions

Definition at line 85 of file archive.h.

typedef QHash<int, QVariant> Kerfuffle::ParameterList

Definition at line 213 of file cliinterface.h.

typedef QHash<QString, QVariant> Kerfuffle::QueryData

Definition at line 42 of file queries.h.


Enumeration Type Documentation

enum Kerfuffle::CliInterfaceParameters
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.

enum Kerfuffle::EntryMetaDataType

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:
FileName 

The entry's file name.

InternalID 

The entry's ID for Ark's internal manipulation.

Permissions 

The entry's permissions.

Owner 

The user the entry belongs to.

Group 

The user group the entry belongs to.

Size 

The entry's original size.

CompressedSize 

The compressed size for the entry.

Link 

The entry is a symbolic link.

Ratio 

The compression ratio for the entry.

CRC 

The entry's CRC.

Method 

The compression method used on the entry.

Version 

The archiver version needed to extract the entry.

Timestamp 

The timestamp for the current entry.

IsDirectory 

The entry is a directory.

Comment 
IsPasswordProtected 

The entry is password-protected.

Custom 

Definition at line 57 of file archive.h.


Function Documentation

KERFUFFLE_EXPORT Archive * Kerfuffle::factory ( const QString &  filename,
const QString &  fixedMimeType 
)
KERFUFFLE_EXPORT QStringList Kerfuffle::supportedMimeTypes (  ) 
KERFUFFLE_EXPORT QStringList Kerfuffle::supportedWriteMimeTypes (  ) 

ark

Skip menu "ark"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdeutils

Skip menu "kdeutils"
  • ark
  • kcalc
  • kcharselect
  • kdelirc
  • kdf
  • kfloppy
  • kgpg
  • ktimer
  • kwallet
  • okteta
  • printer-applet
  • superkaramba
  • sweeper
Generated for kdeutils by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal