![]() | ![]() | ![]() | libevdocument Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
enum EvCompressionType; const gchar * ev_tmp_dir (void); gboolean ev_dir_ensure_exists (const gchar *dir, int mode); GFile * ev_tmp_file_get (const gchar *prefix); gchar * ev_tmp_filename (const char *prefix); gchar * ev_tmp_directory (const char *prefix); void ev_tmp_filename_unlink (const gchar *filename); void ev_tmp_file_unlink (GFile *file); void ev_tmp_uri_unlink (const gchar *uri); gboolean ev_xfer_uri_simple (const char *from, const char *to, GError **error); gchar * ev_file_get_mime_type (const gchar *uri, gboolean fast, GError **error); gchar * ev_file_uncompress (const gchar *uri, EvCompressionType type, GError **error); gchar * ev_file_compress (const gchar *uri, EvCompressionType type, GError **error);
typedef enum { EV_COMPRESSION_NONE, EV_COMPRESSION_BZIP2, EV_COMPRESSION_GZIP } EvCompressionType;
gboolean ev_dir_ensure_exists (const gchar *dir, int mode);
dir : | |
mode : | |
Returns : |
gboolean ev_xfer_uri_simple (const char *from, const char *to, GError **error);
Performs a g_file_copy() from from to to.
gchar * ev_file_get_mime_type (const gchar *uri, gboolean fast, GError **error);
Note: on unknown MIME types, this may return NULL without error being filled in.
gchar * ev_file_uncompress (const gchar *uri, EvCompressionType type, GError **error);
Uncompresses the file at uri.
If type is EV_COMPRESSION_NONE, it does nothing and returns NULL.
Otherwise, it returns the filename of a temporary file containing the decompressed data from the file at uri. On error it returns NULL and fills in error.
It is the caller's responsibility to unlink the temp file after use.
gchar * ev_file_compress (const gchar *uri, EvCompressionType type, GError **error);
Compresses the file at uri. If type is EV_COMPRESSION_NONE, it does nothing and returns NULL.
Otherwise, it returns the filename of a temporary file containing the compressed data from the file at uri.
On error it returns NULL and fills in error.
It is the caller's responsibility to unlink the temp file after use.