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 "ut_compiler.h"
00033 ABI_W_NO_CONST_QUAL
00034 #include <glib.h>
00035 #include <gsf/gsf.h>
00036 ABI_W_POP
00037 #include <time.h>
00038
00039 G_BEGIN_DECLS
00040
00041 typedef struct _UT_GOFilePermissions UT_GOFilePermissions;
00042
00043 struct _UT_GOFilePermissions {
00044 gboolean owner_read;
00045 gboolean owner_write;
00046 gboolean owner_execute;
00047
00048 gboolean group_read;
00049 gboolean group_write;
00050 gboolean group_execute;
00051
00052 gboolean others_read;
00053 gboolean others_write;
00054 gboolean others_execute;
00055 };
00056
00057 enum UT_GODotDot {
00058 UT_GO_DOTDOT_SYNTACTIC,
00059 UT_GO_DOTDOT_TEST,
00060 UT_GO_DOTDOT_LEAVE
00061 };
00062
00063 ABI_EXPORT gboolean UT_go_path_is_uri (const char * path);
00064 ABI_EXPORT gboolean UT_go_path_is_path (const char * path);
00065
00066 ABI_EXPORT char *UT_go_filename_simplify (const char *filename, UT_GODotDot dotdot, gboolean make_absolute);
00067 ABI_EXPORT char *UT_go_url_simplify (const char *uri);
00068
00069 ABI_EXPORT char *UT_go_filename_from_uri (const char *uri);
00070 ABI_EXPORT char *UT_go_filename_to_uri (const char *filename);
00071
00072 ABI_EXPORT char *UT_go_url_resolve_relative (const char *ref_uri, const char *rel_uri);
00073 ABI_EXPORT char *UT_go_url_make_relative (const char *uri, const char *ref_uri);
00074
00075 ABI_EXPORT char *UT_go_shell_arg_to_uri (const char *arg);
00076 ABI_EXPORT char *UT_go_basename_from_uri (const char *uri);
00077 ABI_EXPORT char *UT_go_dirname_from_uri (const char *uri, gboolean brief);
00078 ABI_EXPORT gboolean UT_go_directory_create (char const *uri, GError **err);
00079
00080 ABI_EXPORT GsfInput *UT_go_file_open (char const *uri, GError **err);
00081 ABI_EXPORT GsfOutput *UT_go_file_create (char const *uri, GError **err);
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 gchar *UT_go_get_mime_type (gchar const *uri);
00096
00097 ABI_EXPORT gint UT_go_utf8_collate_casefold (const char *a, const char *b);
00098
00099 G_END_DECLS
00100
00101 #endif
00102
00103