Top | ![]() |
![]() |
![]() |
![]() |
GList * | fm_template_list_all () |
const gchar * | fm_template_get_name () |
FmMimeType * | fm_template_get_mime_type () |
FmIcon * | fm_template_get_icon () |
const gchar * | fm_template_get_prompt () |
const gchar * | fm_template_get_label () |
gboolean | fm_template_is_directory () |
gboolean | fm_template_create_file () |
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.
GList *
fm_template_list_all (gboolean user_only
);
Retrieves list of all templates. Returned data should be freed after usage with g_list_free_full(list, g_object_unref).
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
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
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_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
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
gboolean
fm_template_is_directory (FmTemplate *templ
);
Checks if templ
is directory template.
Since: 1.2.0
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