#include <glib.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 |
#define | g_access access |
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) |
gchar * | go_file_get_owner_name (char const *uri) |
gchar * | go_file_get_group_name (char const *uri) |
GOFilePermissions * | go_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) |
gboolean | go_url_check_extension (gchar const *uri, gchar const *std_ext, gchar **new_uri) |
go_url_check_extension : Uri : Standard extension for the content type : New uri | |
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 const * | go_mime_type_get_description (gchar const *mime_type) |
go_mime_type_get_description: : the mime type to describe. |
#define F_OK 0 |
#define g_access access |
Referenced by go_file_access(), and XAP_UnixApp::migrate().
#define R_OK 4 |
#define W_OK 2 |
#define X_OK 1 |
typedef typedefG_BEGIN_DECLS struct _GOFilePermissions GOFilePermissions |
enum GODotDot |
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.
References file, and go_filename_from_uri().
Referenced by go_gtk_url_is_writeable().
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.
References go_filename_from_uri().
Referenced by go_gtk_url_is_writeable().
gint go_file_access | ( | char const * | uri, | |
gint | mode | |||
) |
References g_access, gchar, and go_filename_from_uri().
Referenced by go_gtk_url_is_writeable().
GsfOutput* go_file_create | ( | char const * | uri, | |
GError ** | err | |||
) |
References fd, go_filename_from_uri(), and is_fd_uri().
time_t go_file_get_date_accessed | ( | char const * | uri | ) |
References GO_FILE_DATE_TYPE_ACCESSED, and go_file_get_date().
time_t go_file_get_date_changed | ( | char const * | uri | ) |
References GO_FILE_DATE_TYPE_CHANGED, and go_file_get_date().
time_t go_file_get_date_modified | ( | char const * | uri | ) |
References GO_FILE_DATE_TYPE_MODIFIED, and go_file_get_date().
gchar* go_file_get_group_name | ( | char const * | uri | ) |
References _, abicollab::service::error(), go_filename_from_uri(), and go_guess_encoding().
gchar* go_file_get_owner_name | ( | char const * | uri | ) |
References _, abicollab::service::error(), go_filename_from_uri(), and go_guess_encoding().
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
References fd, go_filename_from_uri(), is_fd_uri(), and open_plain_file().
GSList* go_file_split_urls | ( | char const * | data | ) |
char* go_filename_from_uri | ( | const char * | uri | ) |
Referenced by go_basename_from_uri(), go_dirname_from_uri(), go_file_access(), go_file_create(), go_file_get_date(), go_file_get_group_name(), go_file_get_owner_name(), go_file_open(), go_get_file_permissions(), go_gtk_url_is_writeable(), go_set_file_permissions(), go_shell_arg_to_uri(), and go_url_simplify().
char* go_filename_simplify | ( | const char * | filename, | |
GODotDot | dotdot, | |||
gboolean | make_absolute | |||
) |
References GO_DOTDOT_SYNTACTIC, and GO_DOTDOT_TEST.
Referenced by go_filename_to_uri().
char* go_filename_to_uri | ( | const char * | filename | ) |
References GO_DOTDOT_TEST, and go_filename_simplify().
Referenced by go_shell_arg_to_uri(), and go_url_simplify().
GOFilePermissions* go_get_file_permissions | ( | char const * | uri | ) |
References go_filename_from_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().
References gchar.
Referenced by AbiGOComponent_FileInsert().
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().
References gchar.
Referenced by IE_Imp_Component::_parseStream(), and IE_Imp_Component_Sniffer::recognizeContents().
gchar const* 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.
References description.
Referenced by AbiGOComponent_Create().
void go_set_file_permissions | ( | char const * | uri, | |
GOFilePermissions * | file_permissions | |||
) |
References go_filename_from_uri().
char* go_shell_arg_to_uri | ( | const char * | arg | ) |
References fd, file, gchar, go_filename_from_uri(), go_filename_to_uri(), go_url_simplify(), and is_fd_uri().
gchar const** go_shell_argv_to_glib_encoding | ( | gint | argc, | |
gchar const ** | argv | |||
) |
void go_shell_argv_to_glib_encoding_free | ( | void | ) |
gboolean go_url_check_extension | ( | gchar const * | uri, | |
gchar const * | std_ext, | |||
gchar ** | new_uri | |||
) |
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 free after use, containing (optionally) modified uri.
Return Value: FALSE if the uri has an extension not matching
References gchar, and go_utf8_collate_casefold().
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 | |||
) |
References make_rel().
char* go_url_resolve_relative | ( | const char * | ref_uri, | |
const char * | rel_uri | |||
) |
References go_url_simplify().
GError* go_url_show | ( | gchar const * | url | ) |
References check_program(), and gchar.
char* go_url_simplify | ( | const char * | uri | ) |
References go_filename_from_uri(), go_filename_to_uri(), and simplify_host_path().
Referenced by go_shell_arg_to_uri(), and go_url_resolve_relative().