Classes | Defines | Typedefs | Enumerations | Functions

go-file.h File Reference

#include <goffice/goffice.h>
#include <gsf/gsf.h>
#include <time.h>

Go to the source code of this file.

Classes

struct  _GOFilePermissions

Defines

#define F_OK   0
#define X_OK   1
#define W_OK   2
#define R_OK   4

Typedefs

typedef typedefG_BEGIN_DECLS
struct _GOFilePermissions 
GOFilePermissions

Enumerations

enum  GODotDot {
  GO_DOTDOT_SYNTACTIC, GO_DOTDOT_TEST, GO_DOTDOT_LEAVE, GO_DOTDOT_SYNTACTIC,
  GO_DOTDOT_TEST, GO_DOTDOT_LEAVE
}

Functions

char * go_filename_simplify (const char *filename, GODotDot dotdot, gboolean make_absolute)
char * go_url_simplify (const char *uri)
char * go_filename_from_uri (const char *uri)
char * go_filename_to_uri (const char *filename)
char * go_url_resolve_relative (const char *ref_uri, const char *rel_uri)
char * go_url_make_relative (const char *uri, const char *ref_uri)
char * go_shell_arg_to_uri (const char *arg)
char * go_basename_from_uri (const char *uri)
 go_basename_from_uri: : The uri
char * go_dirname_from_uri (const char *uri, gboolean brief)
 go_dirname_from_uri: : target
gchar const ** go_shell_argv_to_glib_encoding (gint argc, gchar const **argv)
void go_shell_argv_to_glib_encoding_free (void)
GsfInput * go_file_open (char const *uri, GError **err)
 go_file_open : : target uri : GError
GsfOutput * go_file_create (char const *uri, GError **err)
GSList * go_file_split_urls (char const *data)
GOFilePermissionsgo_get_file_permissions (char const *uri)
void go_set_file_permissions (char const *uri, GOFilePermissions *file_permissions)
time_t go_file_get_date_accessed (char const *uri)
time_t go_file_get_date_modified (char const *uri)
time_t go_file_get_date_changed (char const *uri)
gint go_file_access (char const *uri, gint mode)
gchar * go_url_decode (gchar const *text)
 go_url_decode: : constant buffer to decode.
gchar * go_url_encode (gchar const *text, int type)
 go_url_encode: : The constant text to be encoded : 0 : mailto, 1: file or http
GError * go_url_show (gchar const *url)
gchar * go_get_mime_type (gchar const *uri)
 go_get_mime_type_for_data: : the uri.
gchar * go_get_mime_type_for_data (gconstpointer data, int data_size)
 go_get_mime_type_for_data: : the data.
gchar * go_mime_type_get_description (gchar const *mime_type)
 go_mime_type_get_description: : the mime type to describe.

Define Documentation

#define F_OK   0

Referenced by XAP_UnixApp::migrate().

#define R_OK   4
#define W_OK   2

Referenced by go_gtk_url_is_writeable().

#define X_OK   1

Typedef Documentation

typedef typedefG_BEGIN_DECLS struct _GOFilePermissions GOFilePermissions

Enumeration Type Documentation

enum GODotDot
Enumerator:
GO_DOTDOT_SYNTACTIC 
GO_DOTDOT_TEST 
GO_DOTDOT_LEAVE 
GO_DOTDOT_SYNTACTIC 
GO_DOTDOT_TEST 
GO_DOTDOT_LEAVE 

Function Documentation

char* go_basename_from_uri ( const char *  uri  ) 

go_basename_from_uri: : The uri

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

Returns: a string that the caller is responsible for freeing.

go_basename_from_uri: : The uri

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

char* go_dirname_from_uri ( const char *  uri,
gboolean  brief 
)

go_dirname_from_uri: : target

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

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

Returns: dirname which the caller is responsible for freeing.

go_dirname_from_uri: : target

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

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

gint go_file_access ( char const *  uri,
gint  mode 
)
GsfOutput* go_file_create ( char const *  uri,
GError **  err 
)
time_t go_file_get_date_accessed ( char const *  uri  ) 
time_t go_file_get_date_changed ( char const *  uri  ) 
time_t go_file_get_date_modified ( char const *  uri  ) 
GsfInput* go_file_open ( char const *  uri,
GError **  err 
)

go_file_open : : target uri : GError

Try all available methods to open a file or return an error Returns: non-NULL on success

go_file_open : : target uri : GError

Try all available methods to open a file or return an error

GSList* go_file_split_urls ( char const *  data  ) 
char* go_filename_from_uri ( const char *  uri  ) 
char* go_filename_simplify ( const char *  filename,
GODotDot  dotdot,
gboolean  make_absolute 
)
char* go_filename_to_uri ( const char *  filename  ) 
GOFilePermissions* go_get_file_permissions ( char const *  uri  ) 
gchar* go_get_mime_type ( gchar const *  uri  ) 

go_get_mime_type_for_data: : the uri.

returns: the mime type for the file as a newly allocated string. Needs to be freed with g_free().

gchar* go_get_mime_type_for_data ( gconstpointer  data,
int  data_size 
)

go_get_mime_type_for_data: : the data.

: the data size

returns: the mime type for the data as a newly allocated string. Needs to be freed with g_free().

gchar* go_mime_type_get_description ( gchar const *  mime_type  ) 

go_mime_type_get_description: : the mime type to describe.

returns: the description for the mime type as a newly allocated string. Needs to be freed with g_free(). If the description is not found, the mime type itself will be returned.

void go_set_file_permissions ( char const *  uri,
GOFilePermissions file_permissions 
)
char* go_shell_arg_to_uri ( const char *  arg  ) 
gchar const** go_shell_argv_to_glib_encoding ( gint  argc,
gchar const **  argv 
)
void go_shell_argv_to_glib_encoding_free ( void   ) 
gchar* go_url_decode ( gchar const *  text  ) 

go_url_decode: : constant buffer to decode.

Decode the result of go_url_encode.

Returns: a decoded string which the caller is responsible for freeing.

gchar* go_url_encode ( gchar const *  text,
int  type 
)

go_url_encode: : The constant text to be encoded : 0 : mailto, 1: file or http

url-encode a string according to RFC 2368.

Returns: an encoded string which the caller is responsible for freeing.

char* go_url_make_relative ( const char *  uri,
const char *  ref_uri 
)
char* go_url_resolve_relative ( const char *  ref_uri,
const char *  rel_uri 
)
GError* go_url_show ( gchar const *  url  ) 
char* go_url_simplify ( const char *  uri  )