| Goffice Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
struct GOFilePermissions; enum GOFileProbeLevel; enum GOFileFormatLevel; enum GODotDot; char * go_filename_simplify (const char *filename,GODotDot dotdot,gboolean make_absolute); char * go_filename_from_uri (const char *uri); char * go_filename_to_uri (const char *filename); char * go_shell_arg_to_uri (const char *arg); char * go_basename_from_uri (const char *uri); char * go_dirname_from_uri (const char *uri,gboolean brief); 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); 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_get_mime_type (gchar const *uri); gchar * go_get_mime_type_for_data (gconstpointer data,int data_size); gchar * go_mime_type_get_description (gchar const *mime_type);
struct GOFilePermissions {
gboolean owner_read;
gboolean owner_write;
gboolean owner_execute;
gboolean group_read;
gboolean group_write;
gboolean group_execute;
gboolean others_read;
gboolean others_write;
gboolean others_execute;
};
typedef enum {
GO_FILE_PROBE_FILE_NAME, /* Test only file name, don't read file contents */
GO_FILE_PROBE_CONTENT, /* Read the whole file if it's necessary */
GO_FILE_PROBE_LAST
} GOFileProbeLevel;
typedef enum {
GO_FILE_FL_NONE, /* No name assigned, won't happen */
GO_FILE_FL_WRITE_ONLY, /* PostScript etc, won't be remembered */
GO_FILE_FL_NEW, /* Wb just created */
GO_FILE_FL_MANUAL, /* Save gets punted to save as */
GO_FILE_FL_MANUAL_REMEMBER, /* Ditto, but remember in history */
GO_FILE_FL_AUTO, /* Save will save to this filename */
GO_FILE_FL_LAST
} GOFileFormatLevel;
typedef enum {
GO_DOTDOT_SYNTACTIC, /* Assume no symlinks. */
GO_DOTDOT_TEST, /* Check. */
GO_DOTDOT_LEAVE /* Leave alone. */
} GODotDot;
char * go_filename_simplify (const char *filename,GODotDot dotdot,gboolean make_absolute);
char * go_basename_from_uri (const char *uri);
Decode the final path component. Returns as UTF-8 encoded suitable for display.
|
The uri |
Returns : |
a string that the caller is responsible for freeing. |
char * go_dirname_from_uri (const char *uri,gboolean brief);
Decode the all but the final path component. Returns as UTF-8 encoded suitable for display.
|
target |
|
if TRUE, hide "file://" if present. |
Returns : |
dirname which the caller is responsible for freeing. |
gchar const ** go_shell_argv_to_glib_encoding (gint argc,gchar const **argv);
GsfInput * go_file_open (char const *uri,GError **err);
Try all available methods to open a file or return an error
void go_set_file_permissions (char const *uri,GOFilePermissions *file_permissions);
gchar * go_get_mime_type_for_data (gconstpointer data,int data_size);
|
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);
|
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. |