00001
00002 #ifndef _LIBGNOMEVFSMM_UTILS_H
00003 #define _LIBGNOMEVFSMM_UTILS_H
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include <libgnomevfsmm/types.h>
00026 #include <libgnomevfsmm/exception.h>
00027 #include <glibmm/ustring.h>
00028
00029
00030 namespace Gnome
00031 {
00032
00033 namespace Vfs
00034 {
00035
00043 Glib::ustring format_file_size_for_display(FileSize size);
00044
00050 Glib::ustring escape_string(const Glib::ustring& unescaped_string);
00051
00058 Glib::ustring escape_path_string(const Glib::ustring& path);
00059
00066 Glib::ustring escape_host_and_path_string(const Glib::ustring& path);
00067
00074 Glib::ustring escape_slashes(const Glib::ustring& unescaped_string);
00075
00086 Glib::ustring unescape_string(const Glib::ustring& escaped_string, const Glib::ustring& illegal_characters = Glib::ustring());
00087
00102 Glib::ustring unescape_string_for_display(const Glib::ustring& escaped_string);
00103
00113 Glib::ustring make_uri_canonical(const Glib::ustring& uri);
00114
00115 Glib::ustring make_path_name_canonical(const Glib::ustring& path);
00116
00124 Glib::ustring expand_initial_tilde(const Glib::ustring& path);
00125
00126
00134 Glib::ustring get_local_path_from_uri(const Glib::ustring& uri);
00135
00141 Glib::ustring get_uri_from_local_path(const Glib::ustring& local_full_path);
00142
00149 bool is_executable_command_string(const Glib::ustring& command_string);
00150
00151 Glib::ustring icon_path_from_filename(const Glib::ustring& filename);
00152
00153 #ifdef GLIBMM_EXCEPTIONS_ENABLED
00154 void url_show (const Glib::ustring& url) throw(exception);
00155 #else
00156 void url_show (const Glib::ustring& url, std::auto_ptr<Gnome::Vfs::exception>& error);
00157 #endif //GLIBMM_EXCEPTIONS_ENABLED
00158
00159
00160
00161
00162 }
00163 }
00164
00165 #endif //_LIBGNOMEVFSMM_UTILS_H
00166