Top | ![]() |
![]() |
![]() |
![]() |
#define | FM_TEMPLATE_TYPE |
gboolean | fm_template_create_file () |
FmIcon * | fm_template_get_icon () |
const gchar * | fm_template_get_label () |
FmMimeType * | fm_template_get_mime_type () |
const gchar * | fm_template_get_name () |
const gchar * | fm_template_get_prompt () |
gboolean | fm_template_is_directory () |
GList * | fm_template_list_all () |
include
: libfm/fm.h
The FmTemplate object represents description which files was set for creation and how those files should be created - that includes custom prompt, file name template, and template contents.
gboolean fm_template_create_file (FmTemplate *templ
,GFile *path
,GError **error
,gboolean run_default
);
Tries to create file at path
using rules of creating from templ
.
templ |
a template descriptor. |
[allow-none] |
path |
path to file to create |
|
error |
location to retrieve error. |
[allow-none] |
run_default |
|
Since 1.2.0
FmIcon *
fm_template_get_icon (FmTemplate *templ
);
Retrieves icon defined for templ
. Returned data are owned by templ
and should be not freed by caller.
Since 1.2.0
const gchar *
fm_template_get_label (FmTemplate *templ
);
Retrieves label for templ
. It can be used as label in menu. Returned
data are owned by templ
and should be not freed by caller.
Since 1.2.0
FmMimeType *
fm_template_get_mime_type (FmTemplate *templ
);
Retrieves MIME type descriptor for templ
. Returned data are owned by
templ
and should be not freed by caller.
Since 1.2.0
const gchar * fm_template_get_name (FmTemplate *templ
,gint *nlen
);
Retrieves file name template for templ
. If nlen
isn't NULL
then it
will receive length of file name template without suffix (in characters).
Returned data are owned by templ
and should be not freed by caller.
Since 1.2.0
const gchar *
fm_template_get_prompt (FmTemplate *templ
);
Retrieves prompt for templ
. It can be used as label in entry for the
desired name. If no prompt is defined then returns NULL
. Returned
data are owned by templ
and should be not freed by caller.
Since 1.2.0
gboolean
fm_template_is_directory (FmTemplate *templ
);
Checks if templ
is directory template.
Since 1.2.0