GOFile

GOFile

Functions

Types and Values

Object Hierarchy

    GEnum
    ╰── GOFileFormatLevel

Description

Functions

go_filename_simplify ()

char *
go_filename_simplify (const char *filename,
                      GODotDot dotdot,
                      gboolean make_absolute);


go_filename_from_uri ()

char *
go_filename_from_uri (const char *uri);


go_filename_to_uri ()

char *
go_filename_to_uri (const char *filename);


go_shell_arg_to_uri ()

char *
go_shell_arg_to_uri (const char *arg);


go_basename_from_uri ()

char *
go_basename_from_uri (const char *uri);

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

Parameters

uri

The uri

 

Returns

a string that the caller is responsible for freeing.


go_dirname_from_uri ()

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.

Parameters

uri

target

 

brief

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

 

Returns

dirname which the caller is responsible for freeing.


go_shell_argv_to_glib_encoding ()

gchar const **
go_shell_argv_to_glib_encoding (gint argc,
                                gchar const **argv);


go_shell_argv_to_glib_encoding_free ()

void
go_shell_argv_to_glib_encoding_free (void);


go_file_open ()

GsfInput *
go_file_open (char const *uri,
              GError **err);

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

Parameters

uri

target uri

 

err

GError

 

Returns

non-NULL on success


go_file_create ()

GsfOutput *
go_file_create (char const *uri,
                GError **err);


go_file_split_urls ()

GSList *
go_file_split_urls (char const *data);


go_file_get_owner_name ()

gchar *
go_file_get_owner_name (char const *uri);


go_file_get_group_name ()

gchar *
go_file_get_group_name (char const *uri);


go_get_file_permissions ()

GOFilePermissions *
go_get_file_permissions (char const *uri);


go_set_file_permissions ()

void
go_set_file_permissions (char const *uri,
                         GOFilePermissions *file_permissions);


go_file_get_date_accessed ()

time_t
go_file_get_date_accessed (char const *uri);


go_file_get_date_modified ()

time_t
go_file_get_date_modified (char const *uri);


go_file_get_date_changed ()

time_t
go_file_get_date_changed (char const *uri);


go_file_access ()

gint
go_file_access (char const *uri,
                gint mode);


go_get_mime_type ()

gchar *
go_get_mime_type (gchar const *uri);


go_get_mime_type_for_data ()

gchar *
go_get_mime_type_for_data (gconstpointer data,
                           int data_size);

Parameters

data

the data.

 

data_size

the data size

 

Returns

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


go_mime_type_get_description ()

gchar *
go_mime_type_get_description (gchar const *mime_type);

Parameters

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.

Types and Values

struct GOFilePermissions

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;
};


enum GOFileProbeLevel

Members

GO_FILE_PROBE_FILE_NAME

   

GO_FILE_PROBE_CONTENT

   

GO_FILE_PROBE_LAST

   

enum GOFileFormatLevel

Members

GO_FILE_FL_NONE

   

GO_FILE_FL_WRITE_ONLY

   

GO_FILE_FL_NEW

   

GO_FILE_FL_MANUAL

   

GO_FILE_FL_MANUAL_REMEMBER

   

GO_FILE_FL_AUTO

   

GO_FILE_FL_LAST

   

enum GODotDot

Members

GO_DOTDOT_SYNTACTIC

   

GO_DOTDOT_TEST

   

GO_DOTDOT_LEAVE