FmArchiver

FmArchiver — Support for packing and unpacking archiver utilities.

Functions

Types and Values

struct FmArchiver

Description

include : libfm/fm.h

The FmArchiver represents support for utilities which can pack files into archive and/or extract them.

Functions

fm_archiver_is_mime_type_supported ()

gboolean
fm_archiver_is_mime_type_supported (FmArchiver *archiver,
                                    const char *type);

fm_archiver_create_archive ()

gboolean
fm_archiver_create_archive (FmArchiver *archiver,
                            GAppLaunchContext *ctx,
                            FmPathList *files);

Creates an archive for files .

Parameters

archiver

the archiver descriptor

 

ctx

a launch context.

[allow-none]

files

files to pack into archive

 

Returns

FALSE.

Since: 0.1.9


fm_archiver_extract_archives ()

gboolean
fm_archiver_extract_archives (FmArchiver *archiver,
                              GAppLaunchContext *ctx,
                              FmPathList *files);

Extracts files from archives.

Parameters

archiver

the archiver descriptor

 

ctx

a launch context.

[allow-none]

files

archives to unpack

 

Returns

FALSE.

Since: 0.1.9


fm_archiver_extract_archives_to ()

gboolean
fm_archiver_extract_archives_to (FmArchiver *archiver,
                                 GAppLaunchContext *ctx,
                                 FmPathList *files,
                                 FmPath *dest_dir);

Extracts files from archives into dest_dir .

Parameters

archiver

archiver descriptor

 

ctx

a launch context.

[allow-none]

files

archives to unpack

 

dest_dir

directory where files should be extracted to

 

Returns

FALSE.

Since: 0.1.9


fm_archiver_get_default ()

FmArchiver *
fm_archiver_get_default ();

Retrieves default GUI archiver used by libfm.

This API is not thread-safe and should be used only in default context.

Returns

archiver descriptor.

Since: 0.1.9


fm_archiver_set_default ()

void
fm_archiver_set_default (FmArchiver *archiver);

Sets default GUI archiver used by libfm.

This API is not thread-safe and should be used only in default context.

Parameters

archiver

archiver descriptor

 

Since: 0.1.9


fm_archiver_get_all ()

const GList *
fm_archiver_get_all ();

Retrieves a list of FmArchiver of all GUI archivers known to libfm.

This API is not thread-safe and should be used only in default context.

Returns

list of archivers.

Since: 0.1.9

Types and Values

struct FmArchiver

struct FmArchiver {
    char* program;
    char* create_cmd;
    char* extract_cmd;
    char* extract_to_cmd;
    char** mime_types;
};

Members

char *program;

archiver program

 

char *create_cmd;

command to create archive

 

char *extract_cmd;

command to extract files from archive

 

char *extract_to_cmd;

command to extract files into destined directory

 

char **mime_types;

list of archive types the archiver supports