Classes | Typedefs | Enumerations | Functions

ut_go_file.h File Reference

#include "ut_types.h"
#include <glib.h>
#include <gsf/gsf.h>
#include <time.h>

Go to the source code of this file.

Classes

struct  _UT_GOFilePermissions

Typedefs

typedef typedefG_BEGIN_DECLS
struct _UT_GOFilePermissions 
UT_GOFilePermissions

Enumerations

enum  UT_GODotDot { UT_GO_DOTDOT_SYNTACTIC, UT_GO_DOTDOT_TEST, UT_GO_DOTDOT_LEAVE }

Functions

ABI_EXPORT gboolean UT_go_path_is_uri (const char *path)
ABI_EXPORT gboolean UT_go_path_is_path (const char *path)
ABI_EXPORT char * UT_go_filename_simplify (const char *filename, UT_GODotDot dotdot, gboolean make_absolute)
ABI_EXPORT char * UT_go_url_simplify (const char *uri)
ABI_EXPORT char * UT_go_filename_from_uri (const char *uri)
ABI_EXPORT char * UT_go_filename_to_uri (const char *filename)
ABI_EXPORT char * UT_go_url_resolve_relative (const char *ref_uri, const char *rel_uri)
ABI_EXPORT char * UT_go_url_make_relative (const char *uri, const char *ref_uri)
ABI_EXPORT char * UT_go_shell_arg_to_uri (const char *arg)
ABI_EXPORT char * UT_go_basename_from_uri (const char *uri)
 UT_go_basename_from_uri: :
ABI_EXPORT char * UT_go_dirname_from_uri (const char *uri, gboolean brief)
 UT_go_dirname_from_uri: :
ABI_EXPORT gboolean UT_go_directory_create (char const *uri, int mode, GError **err)
ABI_EXPORT gchar const ** UT_go_shell_argv_to_glib_encoding (gint argc, gchar const **argv)
ABI_EXPORT void UT_go_shell_argv_to_glib_encoding_free (void)
ABI_EXPORT GsfInput * UT_go_file_open (char const *uri, GError **err)
 UT_go_file_open : : : GError.
ABI_EXPORT GsfOutput * UT_go_file_create (char const *uri, GError **err)
ABI_EXPORT GSList * UT_go_file_split_urls (char const *data)
ABI_EXPORT gboolean UT_go_file_remove (char const *uri, GError **err)
ABI_EXPORT gboolean UT_go_file_exists (char const *uri)
ABI_EXPORT UT_GOFilePermissionsUT_go_get_file_permissions (char const *uri)
ABI_EXPORT void UT_go_set_file_permissions (char const *uri, UT_GOFilePermissions *file_permissions)
ABI_EXPORT time_t UT_go_file_get_date_accessed (char const *uri)
ABI_EXPORT time_t UT_go_file_get_date_modified (char const *uri)
ABI_EXPORT time_t UT_go_file_get_date_changed (char const *uri)
ABI_EXPORT GError * UT_go_url_show (gchar const *url)
ABI_EXPORT gboolean UT_go_url_check_extension (gchar const *uri, gchar const *std_ext, gchar **new_uri)
 UT_go_url_check_extension : Uri : Standard extension for the content type : New uri.
ABI_EXPORT gchar * UT_go_get_mime_type (gchar const *uri)
ABI_EXPORT gchar * UT_go_get_mime_type_for_data (gconstpointer data, int data_size)
ABI_EXPORT gchar const * UT_go_mime_type_get_description (gchar const *mime_type)
ABI_EXPORT const char * UT_go_guess_encoding (const char *raw, size_t len, const char *user_guess, char **utf8_str)
ABI_EXPORT char const * UT_go_get_real_name (void)
 UT_go_get_real_name :
ABI_EXPORT gint UT_go_utf8_collate_casefold (const char *a, const char *b)

Typedef Documentation

typedef typedefG_BEGIN_DECLS struct _UT_GOFilePermissions UT_GOFilePermissions

Enumeration Type Documentation

Enumerator:
UT_GO_DOTDOT_SYNTACTIC 
UT_GO_DOTDOT_TEST 
UT_GO_DOTDOT_LEAVE 

Function Documentation

ABI_EXPORT char* UT_go_basename_from_uri ( const char *  uri  ) 
ABI_EXPORT gboolean UT_go_directory_create ( char const *  uri,
int  mode,
GError **  err 
)
ABI_EXPORT char* UT_go_dirname_from_uri ( const char *  uri,
gboolean  brief 
)

UT_go_dirname_from_uri: :

: if TRUE, hide "file://" if present.

Decode the all but the final path component. Returns as UTF-8 encoded suitable for display.

References UT_go_filename_from_uri().

Referenced by IE_Exp_HTML::_createChapter(), s_LaTeX_Listener::_handleImage(), IE_Exp_HTML_DataExporter::IE_Exp_HTML_DataExporter(), and XAP_UnixDialog_FileOpenSaveAs::runModal().

ABI_EXPORT GsfOutput* UT_go_file_create ( char const *  uri,
GError **  err 
)
ABI_EXPORT gboolean UT_go_file_exists ( char const *  uri  ) 
ABI_EXPORT time_t UT_go_file_get_date_accessed ( char const *  uri  ) 
ABI_EXPORT time_t UT_go_file_get_date_changed ( char const *  uri  ) 
ABI_EXPORT time_t UT_go_file_get_date_modified ( char const *  uri  ) 
ABI_EXPORT GsfInput* UT_go_file_open ( char const *  uri,
GError **  err 
)
ABI_EXPORT gboolean UT_go_file_remove ( char const *  uri,
GError **  err 
)
ABI_EXPORT GSList* UT_go_file_split_urls ( char const *  data  ) 
ABI_EXPORT char* UT_go_filename_from_uri ( const char *  uri  ) 
ABI_EXPORT char* UT_go_filename_simplify ( const char *  filename,
UT_GODotDot  dotdot,
gboolean  make_absolute 
)
ABI_EXPORT char* UT_go_filename_to_uri ( const char *  filename  ) 
ABI_EXPORT UT_GOFilePermissions* UT_go_get_file_permissions ( char const *  uri  ) 
ABI_EXPORT gchar* UT_go_get_mime_type ( gchar const *  uri  ) 
ABI_EXPORT gchar* UT_go_get_mime_type_for_data ( gconstpointer  data,
int  data_size 
)

References UT_UNUSED.

ABI_EXPORT char const* UT_go_get_real_name ( void   ) 

UT_go_get_real_name :

Return a utf8 encoded string with the current user name. Caller should _NOT_ g_free the result.

References UT_go_guess_encoding().

ABI_EXPORT const char* UT_go_guess_encoding ( const char *  raw,
size_t  len,
const char *  user_guess,
char **  utf8_str 
)
ABI_EXPORT gchar const* UT_go_mime_type_get_description ( gchar const *  mime_type  ) 
ABI_EXPORT gboolean UT_go_path_is_path ( const char *  path  ) 
ABI_EXPORT gboolean UT_go_path_is_uri ( const char *  path  ) 
ABI_EXPORT void UT_go_set_file_permissions ( char const *  uri,
UT_GOFilePermissions file_permissions 
)
ABI_EXPORT char* UT_go_shell_arg_to_uri ( const char *  arg  ) 
ABI_EXPORT gchar const** UT_go_shell_argv_to_glib_encoding ( gint  argc,
gchar const **  argv 
)

References gchar, and UT_UNUSED.

ABI_EXPORT void UT_go_shell_argv_to_glib_encoding_free ( void   ) 
ABI_EXPORT gboolean UT_go_url_check_extension ( gchar const *  uri,
gchar const *  std_ext,
gchar **  new_uri 
)

UT_go_url_check_extension : Uri : Standard extension for the content type : New uri.

Modifies given by adding the extension if needed. If no is given or already has some extension, it just copies .

Value in new_uri: newly allocated string which you should g_free after use, containing (optionally) modified uri.

Return Value: FALSE if the uri has an extension not matching

References gchar, and UT_go_utf8_collate_casefold().

ABI_EXPORT char* UT_go_url_make_relative ( const char *  uri,
const char *  ref_uri 
)

References make_rel().

ABI_EXPORT char* UT_go_url_resolve_relative ( const char *  ref_uri,
const char *  rel_uri 
)
ABI_EXPORT GError* UT_go_url_show ( gchar const *  url  ) 
ABI_EXPORT char* UT_go_url_simplify ( const char *  uri  ) 
ABI_EXPORT gint UT_go_utf8_collate_casefold ( const char *  a,
const char *  b 
)