Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef UT_GO_FILE_H
00022 #define UT_GO_FILE_H
00023
00024
00025
00026
00027
00028 #ifndef UT_TYPES_H
00029 #include "ut_types.h"
00030 #endif
00031
00032 #include <glib.h>
00033 #include <gsf/gsf.h>
00034 #include <time.h>
00035
00036 G_BEGIN_DECLS
00037
00038 typedef struct _UT_GOFilePermissions UT_GOFilePermissions;
00039
00040 struct _UT_GOFilePermissions {
00041 gboolean owner_read;
00042 gboolean owner_write;
00043 gboolean owner_execute;
00044
00045 gboolean group_read;
00046 gboolean group_write;
00047 gboolean group_execute;
00048
00049 gboolean others_read;
00050 gboolean others_write;
00051 gboolean others_execute;
00052 };
00053
00054 typedef enum {
00055 UT_GO_DOTDOT_SYNTACTIC,
00056 UT_GO_DOTDOT_TEST,
00057 UT_GO_DOTDOT_LEAVE
00058 } UT_GODotDot;
00059
00060 ABI_EXPORT gboolean UT_go_path_is_uri (const char * path);
00061 ABI_EXPORT gboolean UT_go_path_is_path (const char * path);
00062
00063 ABI_EXPORT char *UT_go_filename_simplify (const char *filename, UT_GODotDot dotdot, gboolean make_absolute);
00064 ABI_EXPORT char *UT_go_url_simplify (const char *uri);
00065
00066 ABI_EXPORT char *UT_go_filename_from_uri (const char *uri);
00067 ABI_EXPORT char *UT_go_filename_to_uri (const char *filename);
00068
00069 ABI_EXPORT char *UT_go_url_resolve_relative (const char *ref_uri, const char *rel_uri);
00070 ABI_EXPORT char *UT_go_url_make_relative (const char *uri, const char *ref_uri);
00071
00072 ABI_EXPORT char *UT_go_shell_arg_to_uri (const char *arg);
00073 ABI_EXPORT char *UT_go_basename_from_uri (const char *uri);
00074 ABI_EXPORT char *UT_go_dirname_from_uri (const char *uri, gboolean brief);
00075 ABI_EXPORT gboolean UT_go_directory_create (char const *uri, int mode, GError **err);
00076 ABI_EXPORT gchar const **UT_go_shell_argv_to_glib_encoding (gint argc, gchar const **argv);
00077 ABI_EXPORT void UT_go_shell_argv_to_glib_encoding_free (void);
00078
00079 ABI_EXPORT GsfInput *UT_go_file_open (char const *uri, GError **err);
00080 ABI_EXPORT GsfOutput *UT_go_file_create (char const *uri, GError **err);
00081 ABI_EXPORT GSList *UT_go_file_split_urls (char const *data);
00082
00083 ABI_EXPORT gboolean UT_go_file_remove (char const *uri, GError **err);
00084
00085 ABI_EXPORT gboolean UT_go_file_exists (char const *uri);
00086
00087 ABI_EXPORT UT_GOFilePermissions *UT_go_get_file_permissions (char const *uri);
00088 ABI_EXPORT void UT_go_set_file_permissions (char const *uri, UT_GOFilePermissions * file_permissions);
00089
00090 ABI_EXPORT time_t UT_go_file_get_date_accessed (char const *uri);
00091 ABI_EXPORT time_t UT_go_file_get_date_modified (char const *uri);
00092 ABI_EXPORT time_t UT_go_file_get_date_changed (char const *uri);
00093
00094 ABI_EXPORT GError *UT_go_url_show (gchar const *url);
00095 ABI_EXPORT gboolean UT_go_url_check_extension (gchar const *uri,
00096 gchar const *std_ext,
00097 gchar **new_uri);
00098 ABI_EXPORT gchar *UT_go_get_mime_type (gchar const *uri);
00099 ABI_EXPORT gchar *UT_go_get_mime_type_for_data (gconstpointer data, int data_size);
00100 ABI_EXPORT gchar const *UT_go_mime_type_get_description (gchar const *mime_type);
00101
00102 ABI_EXPORT const char * UT_go_guess_encoding (const char *raw, size_t len, const char *user_guess, char **utf8_str);
00103 ABI_EXPORT char const * UT_go_get_real_name (void);
00104 ABI_EXPORT gint UT_go_utf8_collate_casefold (const char *a, const char *b);
00105
00106 G_END_DECLS
00107
00108 #endif
00109
00110