~ubuntu-branches/ubuntu/natty/gnome-vfs/natty

« back to all changes in this revision

Viewing changes to doc/html/gnome-vfs-2.0-gnome-vfs-utils.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2009-03-17 16:12:58 UTC
  • mfrom: (0.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090317161258-px3a2czt9g2ktjz3
Tags: 1:2.24.1-0ubuntu1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<html>
 
3
<head>
 
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
5
<title>gnome-vfs-utils</title>
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.74.3">
 
7
<link rel="home" href="index.html" title="GnomeVFS - Filesystem Abstraction library">
 
8
<link rel="up" href="data-types.html" title="Basic Data Types">
 
9
<link rel="prev" href="gnome-vfs-2.0-gnome-vfs-uri.html" title="GnomeVFSURI">
 
10
<link rel="next" href="gnome-vfs-2.0-gnome-vfs-file-info.html" title="GnomeVFSFileInfo">
 
11
<meta name="generator" content="GTK-Doc V1.12 (XML mode)">
 
12
<link rel="stylesheet" href="style.css" type="text/css">
 
13
<link rel="chapter" href="about.html" title="Introduction to GnomeVFS">
 
14
<link rel="chapter" href="data-types.html" title="Basic Data Types">
 
15
<link rel="chapter" href="gnome-vfs-basic-file-ops.html" title="File Operations">
 
16
<link rel="chapter" href="gnome-vfs-directory-ops.html" title="Directory-Specific Operations">
 
17
<link rel="chapter" href="gnome-vfs-file-and-dirs-ops.html" title="Advanced File/Directory Operations">
 
18
<link rel="chapter" href="gnome-vfs-file-async-ops.html" title="Asynchronous Operations">
 
19
<link rel="chapter" href="volumes.html" title="Volumes and Drives Handling">
 
20
<link rel="chapter" href="networking.html" title="Networking">
 
21
<link rel="chapter" href="mime-registry.html" title="MIME Registry">
 
22
<link rel="chapter" href="modules.html" title="Filesystem Modules">
 
23
</head>
 
24
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 
25
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
 
26
<tr valign="middle">
 
27
<td><a accesskey="p" href="gnome-vfs-2.0-gnome-vfs-uri.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
 
28
<td><a accesskey="u" href="data-types.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
 
29
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
 
30
<th width="100%" align="center">GnomeVFS - Filesystem Abstraction library</th>
 
31
<td><a accesskey="n" href="gnome-vfs-2.0-gnome-vfs-file-info.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 
32
</tr>
 
33
<tr><td colspan="5" class="shortcuts">
 
34
<a href="#gnome-vfs-2.0-gnome-vfs-utils.synopsis" class="shortcut">Top</a>
 
35
                   | 
 
36
                  <a href="#gnome-vfs-2.0-gnome-vfs-utils.description" class="shortcut">Description</a>
 
37
</td></tr>
 
38
</table>
 
39
<div class="refentry" lang="en">
 
40
<a name="gnome-vfs-2.0-gnome-vfs-utils"></a><div class="titlepage"></div>
 
41
<div class="refnamediv"><table width="100%"><tr>
 
42
<td valign="top">
 
43
<h2><span class="refentrytitle"><a name="gnome-vfs-2.0-gnome-vfs-utils.top_of_page"></a>gnome-vfs-utils</span></h2>
 
44
<p>gnome-vfs-utils — various utilities functions to manipulate uris</p>
 
45
</td>
 
46
<td valign="top" align="right"></td>
 
47
</tr></table></div>
 
48
<div class="refsynopsisdiv">
 
49
<a name="gnome-vfs-2.0-gnome-vfs-utils.synopsis"></a><h2>Synopsis</h2>
 
50
<pre class="synopsis">
 
51
enum                <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#GnomeVFSMakeURIDirs" title="enum GnomeVFSMakeURIDirs">GnomeVFSMakeURIDirs</a>;
 
52
char *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-format-file-size-for-display" title="gnome_vfs_format_file_size_for_display ()">gnome_vfs_format_file_size_for_display</a>
 
53
                                                        (<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> size);
 
54
char *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-format-uri-for-display" title="gnome_vfs_format_uri_for_display ()">gnome_vfs_format_uri_for_display</a>    (const char *uri);
 
55
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-url-show" title="gnome_vfs_url_show ()">gnome_vfs_url_show</a>                  (const char *url);
 
56
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-url-show-with-env" title="gnome_vfs_url_show_with_env ()">gnome_vfs_url_show_with_env</a>         (const char *url,
 
57
                                                         char **envp);
 
58
char *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-escape-string" title="gnome_vfs_escape_string ()">gnome_vfs_escape_string</a>             (const char *string);
 
59
char *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-escape-path-string" title="gnome_vfs_escape_path_string ()">gnome_vfs_escape_path_string</a>        (const char *path);
 
60
char *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-escape-host-and-path-string" title="gnome_vfs_escape_host_and_path_string ()">gnome_vfs_escape_host_and_path_string</a>
 
61
                                                        (const char *path);
 
62
char *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-escape-slashes" title="gnome_vfs_escape_slashes ()">gnome_vfs_escape_slashes</a>            (const char *string);
 
63
char *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-escape-set" title="gnome_vfs_escape_set ()">gnome_vfs_escape_set</a>                (const char *string,
 
64
                                                         const char *match_set);
 
65
char *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-unescape-string" title="gnome_vfs_unescape_string ()">gnome_vfs_unescape_string</a>           (const char *escaped_string,
 
66
                                                         const char *illegal_characters);
 
67
char *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-make-uri-canonical" title="gnome_vfs_make_uri_canonical ()">gnome_vfs_make_uri_canonical</a>        (const char *uri);
 
68
char *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-make-uri-canonical-strip-fragment" title="gnome_vfs_make_uri_canonical_strip_fragment ()">gnome_vfs_make_uri_canonical_strip_fragment</a>
 
69
                                                        (const char *uri);
 
70
char *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-make-path-name-canonical" title="gnome_vfs_make_path_name_canonical ()">gnome_vfs_make_path_name_canonical</a>  (const char *path);
 
71
char *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-make-uri-from-input" title="gnome_vfs_make_uri_from_input ()">gnome_vfs_make_uri_from_input</a>       (const char *location);
 
72
char *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-make-uri-from-input-with-dirs" title="gnome_vfs_make_uri_from_input_with_dirs ()">gnome_vfs_make_uri_from_input_with_dirs</a>
 
73
                                                        (const char *location,
 
74
                                                         <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#GnomeVFSMakeURIDirs" title="enum GnomeVFSMakeURIDirs">GnomeVFSMakeURIDirs</a> dirs);
 
75
char *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-make-uri-from-shell-arg" title="gnome_vfs_make_uri_from_shell_arg ()">gnome_vfs_make_uri_from_shell_arg</a>   (const char *uri);
 
76
char *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-make-uri-full-from-relative" title="gnome_vfs_make_uri_full_from_relative ()">gnome_vfs_make_uri_full_from_relative</a>
 
77
                                                        (const char *base_uri,
 
78
                                                         const char *relative_uri);
 
79
char *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-expand-initial-tilde" title="gnome_vfs_expand_initial_tilde ()">gnome_vfs_expand_initial_tilde</a>      (const char *path);
 
80
char *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-unescape-string-for-display" title="gnome_vfs_unescape_string_for_display ()">gnome_vfs_unescape_string_for_display</a>
 
81
                                                        (const char *escaped);
 
82
char *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-get-local-path-from-uri" title="gnome_vfs_get_local_path_from_uri ()">gnome_vfs_get_local_path_from_uri</a>   (const char *uri);
 
83
char *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-get-uri-from-local-path" title="gnome_vfs_get_uri_from_local_path ()">gnome_vfs_get_uri_from_local_path</a>   (const char *local_full_path);
 
84
gboolean            <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-is-executable-command-string" title="gnome_vfs_is_executable_command_string ()">gnome_vfs_is_executable_command_string</a>
 
85
                                                        (const char *command_string);
 
86
void                <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-list-deep-free" title="gnome_vfs_list_deep_free ()">gnome_vfs_list_deep_free</a>            (GList *list);
 
87
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-get-volume-free-space" title="gnome_vfs_get_volume_free_space ()">gnome_vfs_get_volume_free_space</a>     (const <a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI">GnomeVFSURI</a> *vfs_uri,
 
88
                                                         <a class="link" href="gnome-vfs-2.0-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> *size);
 
89
char *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-icon-path-from-filename" title="gnome_vfs_icon_path_from_filename ()">gnome_vfs_icon_path_from_filename</a>   (const char *filename);
 
90
gboolean            <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-is-primary-thread" title="gnome_vfs_is_primary_thread ()">gnome_vfs_is_primary_thread</a>         (void);
 
91
char *              <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-get-uri-scheme" title="gnome_vfs_get_uri_scheme ()">gnome_vfs_get_uri_scheme</a>            (const char *uri);
 
92
gboolean            <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-uris-match" title="gnome_vfs_uris_match ()">gnome_vfs_uris_match</a>                (const char *uri_1,
 
93
                                                         const char *uri_2);
 
94
#define             <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#GNOME-VFS-ASSERT-PRIMARY-THREAD:CAPS" title="GNOME_VFS_ASSERT_PRIMARY_THREAD">GNOME_VFS_ASSERT_PRIMARY_THREAD</a>
 
95
#define             <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#GNOME-VFS-ASSERT-SECONDARY-THREAD:CAPS" title="GNOME_VFS_ASSERT_SECONDARY_THREAD">GNOME_VFS_ASSERT_SECONDARY_THREAD</a>
 
96
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-open-fd" title="gnome_vfs_open_fd ()">gnome_vfs_open_fd</a>                   (GnomeVFSHandle **handle,
 
97
                                                         int filedes);
 
98
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-read-entire-file" title="gnome_vfs_read_entire_file ()">gnome_vfs_read_entire_file</a>          (const char *uri,
 
99
                                                         int *file_size,
 
100
                                                         char **file_contents);
 
101
</pre>
 
102
</div>
 
103
<div class="refsect1" lang="en">
 
104
<a name="gnome-vfs-2.0-gnome-vfs-utils.description"></a><h2>Description</h2>
 
105
<p>
 
106
</p>
 
107
</div>
 
108
<div class="refsect1" lang="en">
 
109
<a name="gnome-vfs-2.0-gnome-vfs-utils.details"></a><h2>Details</h2>
 
110
<div class="refsect2" lang="en">
 
111
<a name="GnomeVFSMakeURIDirs"></a><h3>enum GnomeVFSMakeURIDirs</h3>
 
112
<pre class="programlisting">typedef enum {
 
113
        GNOME_VFS_MAKE_URI_DIR_NONE = 0,
 
114
        GNOME_VFS_MAKE_URI_DIR_HOMEDIR = 1 &lt;&lt; 0,
 
115
        GNOME_VFS_MAKE_URI_DIR_CURRENT = 1 &lt;&lt; 1
 
116
} GnomeVFSMakeURIDirs;
 
117
</pre>
 
118
<p>
 
119
Flags that can be passed to <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-make-uri-from-input-with-dirs" title="gnome_vfs_make_uri_from_input_with_dirs ()"><code class="function">gnome_vfs_make_uri_from_input_with_dirs()</code></a>.
 
120
If the given input might be a relative path it checks for existence of the file
 
121
in the directory specified by this flag.
 
122
If both flags are passed the current directory is checked first.</p>
 
123
<p>
 
124
</p>
 
125
<div class="variablelist"><table border="0">
 
126
<col align="left" valign="top">
 
127
<tbody>
 
128
<tr>
 
129
<td><p><a name="GNOME-VFS-MAKE-URI-DIR-NONE:CAPS"></a><span class="term"><code class="literal">GNOME_VFS_MAKE_URI_DIR_NONE</code></span></p></td>
 
130
<td> Don't check any directory
 
131
</td>
 
132
</tr>
 
133
<tr>
 
134
<td><p><a name="GNOME-VFS-MAKE-URI-DIR-HOMEDIR:CAPS"></a><span class="term"><code class="literal">GNOME_VFS_MAKE_URI_DIR_HOMEDIR</code></span></p></td>
 
135
<td> Check the home directory
 
136
</td>
 
137
</tr>
 
138
<tr>
 
139
<td><p><a name="GNOME-VFS-MAKE-URI-DIR-CURRENT:CAPS"></a><span class="term"><code class="literal">GNOME_VFS_MAKE_URI_DIR_CURRENT</code></span></p></td>
 
140
<td> Check the current direcotry
 
141
</td>
 
142
</tr>
 
143
</tbody>
 
144
</table></div>
 
145
</div>
 
146
<hr>
 
147
<div class="refsect2" lang="en">
 
148
<a name="gnome-vfs-format-file-size-for-display"></a><h3>gnome_vfs_format_file_size_for_display ()</h3>
 
149
<pre class="programlisting">char *              gnome_vfs_format_file_size_for_display
 
150
                                                        (<a class="link" href="gnome-vfs-2.0-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> size);</pre>
 
151
<p>
 
152
Formats the file <em class="parameter"><code>size</code></em> passed so that it is easy for
 
153
the user to read. Gives the size in bytes, kilobytes, megabytes or
 
154
gigabytes, choosing whatever is appropriate.</p>
 
155
<p>
 
156
</p>
 
157
<div class="variablelist"><table border="0">
 
158
<col align="left" valign="top">
 
159
<tbody>
 
160
<tr>
 
161
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
 
162
<td> a <a class="link" href="gnome-vfs-2.0-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize"><span class="type">GnomeVFSFileSize</span></a> (a <span class="type">guint64</span> value).
 
163
</td>
 
164
</tr>
 
165
<tr>
 
166
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
167
<td> a newly allocated string with the size ready to be shown.
 
168
</td>
 
169
</tr>
 
170
</tbody>
 
171
</table></div>
 
172
</div>
 
173
<hr>
 
174
<div class="refsect2" lang="en">
 
175
<a name="gnome-vfs-format-uri-for-display"></a><h3>gnome_vfs_format_uri_for_display ()</h3>
 
176
<pre class="programlisting">char *              gnome_vfs_format_uri_for_display    (const char *uri);</pre>
 
177
<p>
 
178
Filter, modify, unescape and change <em class="parameter"><code>uri</code></em> to make it appropriate
 
179
for display to users. The conversion is done such that the roundtrip
 
180
to UTF-8 is reversible.
 
181
</p>
 
182
<p>
 
183
Rules:
 
184
        file: uri without fragments should appear as local paths.
 
185
        file: uri with fragments should appear as file:uri.
 
186
        All other uri appear as expected.</p>
 
187
<p>
 
188
</p>
 
189
<div class="variablelist"><table border="0">
 
190
<col align="left" valign="top">
 
191
<tbody>
 
192
<tr>
 
193
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
194
<td> uri to be displayed.
 
195
</td>
 
196
</tr>
 
197
<tr>
 
198
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
199
<td> a newly allocated string which represents <em class="parameter"><code>uri</code></em> and can be displayed.
 
200
 
 
201
</td>
 
202
</tr>
 
203
</tbody>
 
204
</table></div>
 
205
<p class="since">Since 2.2</p>
 
206
</div>
 
207
<hr>
 
208
<div class="refsect2" lang="en">
 
209
<a name="gnome-vfs-url-show"></a><h3>gnome_vfs_url_show ()</h3>
 
210
<pre class="programlisting"><a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_url_show                  (const char *url);</pre>
 
211
<p>
 
212
Launches the default application or component associated with the given <em class="parameter"><code>url</code></em>.</p>
 
213
<p>
 
214
</p>
 
215
<div class="variablelist"><table border="0">
 
216
<col align="left" valign="top">
 
217
<tbody>
 
218
<tr>
 
219
<td><p><span class="term"><em class="parameter"><code>url</code></em> :</span></p></td>
 
220
<td> url to be shown.
 
221
</td>
 
222
</tr>
 
223
<tr>
 
224
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
225
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a> if the default action was launched,
 
226
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-ERROR-BAD-PARAMETERS:CAPS"><code class="literal">GNOME_VFS_ERROR_BAD_PARAMETERS</code></a> for an invalid or non-existant <em class="parameter"><code>url</code></em>,
 
227
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-ERROR-NO-DEFAULT:CAPS"><code class="literal">GNOME_VFS_ERROR_NO_DEFAULT</code></a> if no default action is associated with the <em class="parameter"><code>url</code></em>.
 
228
Also error codes from <a class="link" href="gnome-vfs-2.0-gnome-vfs-mime-database-deprecated.html#gnome-vfs-mime-action-launch" title="gnome_vfs_mime_action_launch ()"><code class="function">gnome_vfs_mime_action_launch()</code></a>
 
229
or <a class="link" href="gnome-vfs-2.0-gnome-vfs-mime-database-deprecated.html#gnome-vfs-mime-action-launch-with-env" title="gnome_vfs_mime_action_launch_with_env ()"><code class="function">gnome_vfs_mime_action_launch_with_env()</code></a>.
 
230
 
 
231
</td>
 
232
</tr>
 
233
</tbody>
 
234
</table></div>
 
235
<p class="since">Since 2.4</p>
 
236
</div>
 
237
<hr>
 
238
<div class="refsect2" lang="en">
 
239
<a name="gnome-vfs-url-show-with-env"></a><h3>gnome_vfs_url_show_with_env ()</h3>
 
240
<pre class="programlisting"><a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_url_show_with_env         (const char *url,
 
241
                                                         char **envp);</pre>
 
242
<p>
 
243
Like <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-url-show" title="gnome_vfs_url_show ()"><code class="function">gnome_vfs_url_show()</code></a> except that the default action will be launched
 
244
with the given environment.</p>
 
245
<p>
 
246
</p>
 
247
<div class="variablelist"><table border="0">
 
248
<col align="left" valign="top">
 
249
<tbody>
 
250
<tr>
 
251
<td><p><span class="term"><em class="parameter"><code>url</code></em> :</span></p></td>
 
252
<td> url to be shown.
 
253
</td>
 
254
</tr>
 
255
<tr>
 
256
<td><p><span class="term"><em class="parameter"><code>envp</code></em> :</span></p></td>
 
257
<td> environment data.
 
258
</td>
 
259
</tr>
 
260
<tr>
 
261
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
262
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a> if the default action was launched.
 
263
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-ERROR-BAD-PARAMETERS:CAPS"><code class="literal">GNOME_VFS_ERROR_BAD_PARAMETERS</code></a> for an invalid or non-existant <em class="parameter"><code>url</code></em>,
 
264
<a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-ERROR-NO-DEFAULT:CAPS"><code class="literal">GNOME_VFS_ERROR_NO_DEFAULT</code></a> if no default action is associated with the <em class="parameter"><code>url</code></em>.
 
265
Also error codes from <a class="link" href="gnome-vfs-2.0-gnome-vfs-mime-database.html#gnome-vfs-mime-application-launch-with-env" title="gnome_vfs_mime_application_launch_with_env ()"><code class="function">gnome_vfs_mime_application_launch_with_env()</code></a>
 
266
or <a class="link" href="gnome-vfs-2.0-gnome-vfs-mime-database-deprecated.html#gnome-vfs-mime-action-launch-with-env" title="gnome_vfs_mime_action_launch_with_env ()"><code class="function">gnome_vfs_mime_action_launch_with_env()</code></a>.
 
267
 
 
268
</td>
 
269
</tr>
 
270
</tbody>
 
271
</table></div>
 
272
<p class="since">Since 2.4</p>
 
273
</div>
 
274
<hr>
 
275
<div class="refsect2" lang="en">
 
276
<a name="gnome-vfs-escape-string"></a><h3>gnome_vfs_escape_string ()</h3>
 
277
<pre class="programlisting">char *              gnome_vfs_escape_string             (const char *string);</pre>
 
278
<p>
 
279
Escapes <em class="parameter"><code>string</code></em>, replacing any and all special characters 
 
280
with equivalent escape sequences.</p>
 
281
<p>
 
282
</p>
 
283
<div class="variablelist"><table border="0">
 
284
<col align="left" valign="top">
 
285
<tbody>
 
286
<tr>
 
287
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
 
288
<td> string to be escaped.
 
289
</td>
 
290
</tr>
 
291
<tr>
 
292
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
293
<td> a newly allocated string equivalent to <em class="parameter"><code>string</code></em>
 
294
but with all special characters escaped.
 
295
</td>
 
296
</tr>
 
297
</tbody>
 
298
</table></div>
 
299
</div>
 
300
<hr>
 
301
<div class="refsect2" lang="en">
 
302
<a name="gnome-vfs-escape-path-string"></a><h3>gnome_vfs_escape_path_string ()</h3>
 
303
<pre class="programlisting">char *              gnome_vfs_escape_path_string        (const char *path);</pre>
 
304
<p>
 
305
Escapes <em class="parameter"><code>path</code></em>, replacing only special characters that would not
 
306
be found in paths (so '/', '&amp;', and '=' will not be escaped by
 
307
this function).</p>
 
308
<p>
 
309
</p>
 
310
<div class="variablelist"><table border="0">
 
311
<col align="left" valign="top">
 
312
<tbody>
 
313
<tr>
 
314
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
 
315
<td> string to be escaped.
 
316
</td>
 
317
</tr>
 
318
<tr>
 
319
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
320
<td> a newly allocated string equivalent to <em class="parameter"><code>path</code></em> but
 
321
with non-path characters escaped.
 
322
</td>
 
323
</tr>
 
324
</tbody>
 
325
</table></div>
 
326
</div>
 
327
<hr>
 
328
<div class="refsect2" lang="en">
 
329
<a name="gnome-vfs-escape-host-and-path-string"></a><h3>gnome_vfs_escape_host_and_path_string ()</h3>
 
330
<pre class="programlisting">char *              gnome_vfs_escape_host_and_path_string
 
331
                                                        (const char *path);</pre>
 
332
<p>
 
333
Escapes <em class="parameter"><code>path</code></em>, replacing only special characters that would not
 
334
be found in paths or host name (so '/', '&amp;', '=', ':' and '@'
 
335
will not be escaped by this function).</p>
 
336
<p>
 
337
</p>
 
338
<div class="variablelist"><table border="0">
 
339
<col align="left" valign="top">
 
340
<tbody>
 
341
<tr>
 
342
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
 
343
<td> string to be escaped.
 
344
</td>
 
345
</tr>
 
346
<tr>
 
347
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
348
<td> a newly allocated string equivalent to <em class="parameter"><code>path</code></em> but
 
349
with non-path/host characters escaped.
 
350
</td>
 
351
</tr>
 
352
</tbody>
 
353
</table></div>
 
354
</div>
 
355
<hr>
 
356
<div class="refsect2" lang="en">
 
357
<a name="gnome-vfs-escape-slashes"></a><h3>gnome_vfs_escape_slashes ()</h3>
 
358
<pre class="programlisting">char *              gnome_vfs_escape_slashes            (const char *string);</pre>
 
359
<p>
 
360
Escapes only '/' and '%' characters in <em class="parameter"><code>string</code></em>, replacing
 
361
them with their escape sequence equivalents.</p>
 
362
<p>
 
363
</p>
 
364
<div class="variablelist"><table border="0">
 
365
<col align="left" valign="top">
 
366
<tbody>
 
367
<tr>
 
368
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
 
369
<td> string to be escaped.
 
370
</td>
 
371
</tr>
 
372
<tr>
 
373
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
374
<td> a newly allocated string equivalent to <em class="parameter"><code>string</code></em>,
 
375
but with no unescaped '/' or '%' characters.
 
376
</td>
 
377
</tr>
 
378
</tbody>
 
379
</table></div>
 
380
</div>
 
381
<hr>
 
382
<div class="refsect2" lang="en">
 
383
<a name="gnome-vfs-escape-set"></a><h3>gnome_vfs_escape_set ()</h3>
 
384
<pre class="programlisting">char *              gnome_vfs_escape_set                (const char *string,
 
385
                                                         const char *match_set);</pre>
 
386
<p>
 
387
Escapes all characters in <em class="parameter"><code>string</code></em> which are listed in <em class="parameter"><code>match_set</code></em>.</p>
 
388
<p>
 
389
</p>
 
390
<div class="variablelist"><table border="0">
 
391
<col align="left" valign="top">
 
392
<tbody>
 
393
<tr>
 
394
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
 
395
<td> string to be escaped.
 
396
</td>
 
397
</tr>
 
398
<tr>
 
399
<td><p><span class="term"><em class="parameter"><code>match_set</code></em> :</span></p></td>
 
400
<td> a string containing all characters to be escaped in <em class="parameter"><code>string</code></em>. 
 
401
</td>
 
402
</tr>
 
403
<tr>
 
404
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
405
<td> a newly allocated string equivalent to <em class="parameter"><code>string</code></em> but 
 
406
with characters in <em class="parameter"><code>match_string</code></em> escaped.
 
407
</td>
 
408
</tr>
 
409
</tbody>
 
410
</table></div>
 
411
</div>
 
412
<hr>
 
413
<div class="refsect2" lang="en">
 
414
<a name="gnome-vfs-unescape-string"></a><h3>gnome_vfs_unescape_string ()</h3>
 
415
<pre class="programlisting">char *              gnome_vfs_unescape_string           (const char *escaped_string,
 
416
                                                         const char *illegal_characters);</pre>
 
417
<p>
 
418
Decodes escaped characters (i.e. PERCENTxx sequences) in <em class="parameter"><code>escaped_string</code></em>.
 
419
Characters are encoded in PERCENTxy form, where xy is the ASCII hex code 
 
420
for character 16x+y.</p>
 
421
<p>
 
422
</p>
 
423
<div class="variablelist"><table border="0">
 
424
<col align="left" valign="top">
 
425
<tbody>
 
426
<tr>
 
427
<td><p><span class="term"><em class="parameter"><code>escaped_string</code></em> :</span></p></td>
 
428
<td> an escaped uri, path, or other string.
 
429
</td>
 
430
</tr>
 
431
<tr>
 
432
<td><p><span class="term"><em class="parameter"><code>illegal_characters</code></em> :</span></p></td>
 
433
<td> a string containing a sequence of characters
 
434
considered "illegal" to be escaped, '\0' is automatically in this list.
 
435
</td>
 
436
</tr>
 
437
<tr>
 
438
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
439
<td> a newly allocated string with the unescaped
 
440
equivalents, or <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>escaped_string</code></em> contained an escaped
 
441
encoding of one of the characters in <em class="parameter"><code>illegal_characters</code></em>.
 
442
</td>
 
443
</tr>
 
444
</tbody>
 
445
</table></div>
 
446
</div>
 
447
<hr>
 
448
<div class="refsect2" lang="en">
 
449
<a name="gnome-vfs-make-uri-canonical"></a><h3>gnome_vfs_make_uri_canonical ()</h3>
 
450
<pre class="programlisting">char *              gnome_vfs_make_uri_canonical        (const char *uri);</pre>
 
451
<p>
 
452
Standardizes the format of the <em class="parameter"><code>uri</code></em>, so that it can be used
 
453
later in other functions that expect a canonical uri.</p>
 
454
<p>
 
455
</p>
 
456
<div class="variablelist"><table border="0">
 
457
<col align="left" valign="top">
 
458
<tbody>
 
459
<tr>
 
460
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
461
<td> an absolute or relative stringified uri. It might have scheme.
 
462
</td>
 
463
</tr>
 
464
<tr>
 
465
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
466
<td> a newly allocated string that contains the canonical 
 
467
representation of <em class="parameter"><code>uri</code></em>.
 
468
 
 
469
</td>
 
470
</tr>
 
471
</tbody>
 
472
</table></div>
 
473
<p class="since">Since 2.2</p>
 
474
</div>
 
475
<hr>
 
476
<div class="refsect2" lang="en">
 
477
<a name="gnome-vfs-make-uri-canonical-strip-fragment"></a><h3>gnome_vfs_make_uri_canonical_strip_fragment ()</h3>
 
478
<pre class="programlisting">char *              gnome_vfs_make_uri_canonical_strip_fragment
 
479
                                                        (const char *uri);</pre>
 
480
<p>
 
481
Returns a canonicalized uri. If <em class="parameter"><code>uri</code></em> contains a fragment (anything after a '#') strips off that and
 
482
then makes the <em class="parameter"><code>uri</code></em> canonical.</p>
 
483
<p>
 
484
</p>
 
485
<div class="variablelist"><table border="0">
 
486
<col align="left" valign="top">
 
487
<tbody>
 
488
<tr>
 
489
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
490
<td> a <span class="type">GnomeVFSURI.</span>
 
491
</td>
 
492
</tr>
 
493
<tr>
 
494
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
495
<td> a newly allocated string containing a canonical <em class="parameter"><code>uri</code></em>.
 
496
 
 
497
</td>
 
498
</tr>
 
499
</tbody>
 
500
</table></div>
 
501
<p class="since">Since 2.2</p>
 
502
</div>
 
503
<hr>
 
504
<div class="refsect2" lang="en">
 
505
<a name="gnome-vfs-make-path-name-canonical"></a><h3>gnome_vfs_make_path_name_canonical ()</h3>
 
506
<pre class="programlisting">char *              gnome_vfs_make_path_name_canonical  (const char *path);</pre>
 
507
<p>
 
508
Calls <code class="function">_gnome_vfs_canonicalize_pathname()</code>, allocating storage for the 
 
509
result and providing for a cleaner memory management.</p>
 
510
<p>
 
511
</p>
 
512
<div class="variablelist"><table border="0">
 
513
<col align="left" valign="top">
 
514
<tbody>
 
515
<tr>
 
516
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
 
517
<td> a file path, relative or absolute.
 
518
</td>
 
519
</tr>
 
520
<tr>
 
521
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
522
<td> a canonical version of <em class="parameter"><code>path</code></em>.
 
523
</td>
 
524
</tr>
 
525
</tbody>
 
526
</table></div>
 
527
</div>
 
528
<hr>
 
529
<div class="refsect2" lang="en">
 
530
<a name="gnome-vfs-make-uri-from-input"></a><h3>gnome_vfs_make_uri_from_input ()</h3>
 
531
<pre class="programlisting">char *              gnome_vfs_make_uri_from_input       (const char *location);</pre>
 
532
<p>
 
533
Takes a user input path/uri and makes a valid uri out of it.
 
534
</p>
 
535
<p>
 
536
This function is the reverse of <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-format-uri-for-display" title="gnome_vfs_format_uri_for_display ()"><code class="function">gnome_vfs_format_uri_for_display()</code></a>
 
537
but it also handles the fact that the user could have typed
 
538
arbitrary UTF-8 in the entry showing the string.</p>
 
539
<p>
 
540
</p>
 
541
<div class="variablelist"><table border="0">
 
542
<col align="left" valign="top">
 
543
<tbody>
 
544
<tr>
 
545
<td><p><span class="term"><em class="parameter"><code>location</code></em> :</span></p></td>
 
546
<td> a possibly mangled "uri", in UTF-8.
 
547
</td>
 
548
</tr>
 
549
<tr>
 
550
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
551
<td> a newly allocated uri.
 
552
 
 
553
</td>
 
554
</tr>
 
555
</tbody>
 
556
</table></div>
 
557
<p class="since">Since 2.2</p>
 
558
</div>
 
559
<hr>
 
560
<div class="refsect2" lang="en">
 
561
<a name="gnome-vfs-make-uri-from-input-with-dirs"></a><h3>gnome_vfs_make_uri_from_input_with_dirs ()</h3>
 
562
<pre class="programlisting">char *              gnome_vfs_make_uri_from_input_with_dirs
 
563
                                                        (const char *location,
 
564
                                                         <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#GnomeVFSMakeURIDirs" title="enum GnomeVFSMakeURIDirs">GnomeVFSMakeURIDirs</a> dirs);</pre>
 
565
<p>
 
566
Determines a fully qualified uri from a relative or absolute input path.
 
567
Basically calls <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-make-uri-from-input" title="gnome_vfs_make_uri_from_input ()"><code class="function">gnome_vfs_make_uri_from_input()</code></a> except it specifically
 
568
tries to support paths relative to the specified directories (can be homedir
 
569
and/or current directory). See <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#GnomeVFSMakeURIDirs" title="enum GnomeVFSMakeURIDirs"><span class="type">GnomeVFSMakeURIDirs</span></a> for more information.</p>
 
570
<p>
 
571
</p>
 
572
<div class="variablelist"><table border="0">
 
573
<col align="left" valign="top">
 
574
<tbody>
 
575
<tr>
 
576
<td><p><span class="term"><em class="parameter"><code>location</code></em> :</span></p></td>
 
577
<td> a relative or absolute path.
 
578
</td>
 
579
</tr>
 
580
<tr>
 
581
<td><p><span class="term"><em class="parameter"><code>dirs</code></em> :</span></p></td>
 
582
<td> directory to use as a base directory if <em class="parameter"><code>location</code></em> is a relative path.
 
583
</td>
 
584
</tr>
 
585
<tr>
 
586
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
587
<td> a newly allocated string containing the fully qualified uri.
 
588
 
 
589
</td>
 
590
</tr>
 
591
</tbody>
 
592
</table></div>
 
593
<p class="since">Since 2.4</p>
 
594
</div>
 
595
<hr>
 
596
<div class="refsect2" lang="en">
 
597
<a name="gnome-vfs-make-uri-from-shell-arg"></a><h3>gnome_vfs_make_uri_from_shell_arg ()</h3>
 
598
<pre class="programlisting">char *              gnome_vfs_make_uri_from_shell_arg   (const char *uri);</pre>
 
599
<p>
 
600
Similar to <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-make-uri-from-input" title="gnome_vfs_make_uri_from_input ()"><code class="function">gnome_vfs_make_uri_from_input()</code></a>, except that:
 
601
</p>
 
602
<p>
 
603
1) guesses relative paths instead of http domains.
 
604
2) doesn't bother stripping leading/trailing white space.
 
605
3) doesn't bother with ~ expansion--that's done by the shell.</p>
 
606
<p>
 
607
</p>
 
608
<div class="variablelist"><table border="0">
 
609
<col align="left" valign="top">
 
610
<tbody>
 
611
<tr>
 
612
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
613
<td> path to make the uri from.
 
614
</td>
 
615
</tr>
 
616
<tr>
 
617
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
618
<td> a newly allocated string representing <em class="parameter"><code>uri</code></em>.
 
619
 
 
620
</td>
 
621
</tr>
 
622
</tbody>
 
623
</table></div>
 
624
<p class="since">Since 2.2</p>
 
625
</div>
 
626
<hr>
 
627
<div class="refsect2" lang="en">
 
628
<a name="gnome-vfs-make-uri-full-from-relative"></a><h3>gnome_vfs_make_uri_full_from_relative ()</h3>
 
629
<pre class="programlisting">char *              gnome_vfs_make_uri_full_from_relative
 
630
                                                        (const char *base_uri,
 
631
                                                         const char *relative_uri);</pre>
 
632
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
 
633
<h3 class="title">Warning</h3>
 
634
<p><code class="literal">gnome_vfs_make_uri_full_from_relative</code> is deprecated and should not be used in newly-written code. This function is deprecated, please use 
 
635
<a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#gnome-vfs-uri-make-full-from-relative" title="gnome_vfs_uri_make_full_from_relative ()"><code class="function">gnome_vfs_uri_make_full_from_relative()</code></a> from gnome-vfs-uri.h .</p>
 
636
</div>
 
637
<p>
 
638
Returns a string representing the full uri given a full <em class="parameter"><code>base_uri</code></em> and a 
 
639
secondary uri which may be relative.</p>
 
640
<p>
 
641
</p>
 
642
<div class="variablelist"><table border="0">
 
643
<col align="left" valign="top">
 
644
<tbody>
 
645
<tr>
 
646
<td><p><span class="term"><em class="parameter"><code>base_uri</code></em> :</span></p></td>
 
647
<td> path to use as the base for the full uri.
 
648
</td>
 
649
</tr>
 
650
<tr>
 
651
<td><p><span class="term"><em class="parameter"><code>relative_uri</code></em> :</span></p></td>
 
652
<td> full or relative path to be appended to the <em class="parameter"><code>base_uri</code></em>.
 
653
</td>
 
654
</tr>
 
655
<tr>
 
656
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
657
<td> a newly allocated string containing the uri.
 
658
(<a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> for some bad errors).
 
659
 
 
660
</td>
 
661
</tr>
 
662
</tbody>
 
663
</table></div>
 
664
<p class="since">Since 2.2</p>
 
665
</div>
 
666
<hr>
 
667
<div class="refsect2" lang="en">
 
668
<a name="gnome-vfs-expand-initial-tilde"></a><h3>gnome_vfs_expand_initial_tilde ()</h3>
 
669
<pre class="programlisting">char *              gnome_vfs_expand_initial_tilde      (const char *path);</pre>
 
670
<p>
 
671
If <em class="parameter"><code>path</code></em> starts with a ~, representing the user's home
 
672
directory, expand it to the actual path location.</p>
 
673
<p>
 
674
</p>
 
675
<div class="variablelist"><table border="0">
 
676
<col align="left" valign="top">
 
677
<tbody>
 
678
<tr>
 
679
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
 
680
<td> a local file path which may start with a '~'.
 
681
</td>
 
682
</tr>
 
683
<tr>
 
684
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
685
<td> a newly allocated string with the initial
 
686
tilde (if there was one) converted to an actual path.
 
687
</td>
 
688
</tr>
 
689
</tbody>
 
690
</table></div>
 
691
</div>
 
692
<hr>
 
693
<div class="refsect2" lang="en">
 
694
<a name="gnome-vfs-unescape-string-for-display"></a><h3>gnome_vfs_unescape_string_for_display ()</h3>
 
695
<pre class="programlisting">char *              gnome_vfs_unescape_string_for_display
 
696
                                                        (const char *escaped);</pre>
 
697
<p>
 
698
Similar to gnome_vfs_unescape_string, but it returns something
 
699
semi-intelligable to a user even upon receiving traumatic input
 
700
such as <code class="literal">00</code> or URIs in bad form.
 
701
</p>
 
702
<p>
 
703
See also: <a class="link" href="gnome-vfs-2.0-gnome-vfs-utils.html#gnome-vfs-unescape-string" title="gnome_vfs_unescape_string ()"><code class="function">gnome_vfs_unescape_string()</code></a>.
 
704
</p>
 
705
<p>
 
706
WARNING: You should never use this function on a whole URI!  It
 
707
unescapes reserved characters, and can result in a mangled URI
 
708
that can not be re-entered.  For example, it unescapes "#" "&amp;" and "?",
 
709
which have special meanings in URI strings.</p>
 
710
<p>
 
711
</p>
 
712
<div class="variablelist"><table border="0">
 
713
<col align="left" valign="top">
 
714
<tbody>
 
715
<tr>
 
716
<td><p><span class="term"><em class="parameter"><code>escaped</code></em> :</span></p></td>
 
717
<td> a string encoded with escaped sequences.
 
718
</td>
 
719
</tr>
 
720
<tr>
 
721
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
722
<td> a pointer to a g_malloc'd string with all characters
 
723
replacing their escaped hex values.
 
724
</td>
 
725
</tr>
 
726
</tbody>
 
727
</table></div>
 
728
</div>
 
729
<hr>
 
730
<div class="refsect2" lang="en">
 
731
<a name="gnome-vfs-get-local-path-from-uri"></a><h3>gnome_vfs_get_local_path_from_uri ()</h3>
 
732
<pre class="programlisting">char *              gnome_vfs_get_local_path_from_uri   (const char *uri);</pre>
 
733
<p>
 
734
Create a local path for a file:/// uri. Do not use with uris
 
735
of other methods.</p>
 
736
<p>
 
737
</p>
 
738
<div class="variablelist"><table border="0">
 
739
<col align="left" valign="top">
 
740
<tbody>
 
741
<tr>
 
742
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
743
<td> uri to convert to a local path.
 
744
</td>
 
745
</tr>
 
746
<tr>
 
747
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
748
<td> a newly allocated string containing the local path.
 
749
<a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned on error or if the uri isn't a file: uri
 
750
without a fragment identifier (or chained uri).
 
751
</td>
 
752
</tr>
 
753
</tbody>
 
754
</table></div>
 
755
</div>
 
756
<hr>
 
757
<div class="refsect2" lang="en">
 
758
<a name="gnome-vfs-get-uri-from-local-path"></a><h3>gnome_vfs_get_uri_from_local_path ()</h3>
 
759
<pre class="programlisting">char *              gnome_vfs_get_uri_from_local_path   (const char *local_full_path);</pre>
 
760
<p>
 
761
Returns a file:/// URI for the local path <em class="parameter"><code>local_full_path</code></em>, 
 
762
such as a path provided by <code class="function">gtk_file_chooser_get_filename()</code>.
 
763
The resulting URI may be provided, for instance, to <a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#gnome-vfs-uri-new" title="gnome_vfs_uri_new ()"><code class="function">gnome_vfs_uri_new()</code></a>.
 
764
</p>
 
765
<p>
 
766
On Windows <em class="parameter"><code>local_full_path</code></em> should be in the UTF-8 encoding, and can start with a drive
 
767
letter, but doesn't have to.</p>
 
768
<p>
 
769
</p>
 
770
<div class="variablelist"><table border="0">
 
771
<col align="left" valign="top">
 
772
<tbody>
 
773
<tr>
 
774
<td><p><span class="term"><em class="parameter"><code>local_full_path</code></em> :</span></p></td>
 
775
<td> a full local filesystem path (i.e. not relative).
 
776
</td>
 
777
</tr>
 
778
<tr>
 
779
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
780
<td> a newly allocated string containing the uri corresponding 
 
781
to <em class="parameter"><code>local_full_path</code></em> (<a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> for some bad errors).
 
782
</td>
 
783
</tr>
 
784
</tbody>
 
785
</table></div>
 
786
</div>
 
787
<hr>
 
788
<div class="refsect2" lang="en">
 
789
<a name="gnome-vfs-is-executable-command-string"></a><h3>gnome_vfs_is_executable_command_string ()</h3>
 
790
<pre class="programlisting">gboolean            gnome_vfs_is_executable_command_string
 
791
                                                        (const char *command_string);</pre>
 
792
<p>
 
793
Checks if <em class="parameter"><code>command_string</code></em> starts with the full path of an executable file
 
794
or an executable in $PATH.</p>
 
795
<p>
 
796
</p>
 
797
<div class="variablelist"><table border="0">
 
798
<col align="left" valign="top">
 
799
<tbody>
 
800
<tr>
 
801
<td><p><span class="term"><em class="parameter"><code>command_string</code></em> :</span></p></td>
 
802
<td> a string representing a command ie "xterm -bg white".
 
803
</td>
 
804
</tr>
 
805
<tr>
 
806
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
807
<td> <code class="literal">TRUE</code> if <em class="parameter"><code>command_string</code></em> started with an executable file, and is in $PATH,
 
808
<code class="literal">FALSE</code> otherwise.
 
809
</td>
 
810
</tr>
 
811
</tbody>
 
812
</table></div>
 
813
</div>
 
814
<hr>
 
815
<div class="refsect2" lang="en">
 
816
<a name="gnome-vfs-list-deep-free"></a><h3>gnome_vfs_list_deep_free ()</h3>
 
817
<pre class="programlisting">void                gnome_vfs_list_deep_free            (GList *list);</pre>
 
818
<p>
 
819
Free <em class="parameter"><code>list</code></em> and call <code class="function">g_free()</code> on all data members.</p>
 
820
<p>
 
821
</p>
 
822
<div class="variablelist"><table border="0">
 
823
<col align="left" valign="top">
 
824
<tbody><tr>
 
825
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
 
826
<td> list to be freed.
 
827
</td>
 
828
</tr></tbody>
 
829
</table></div>
 
830
</div>
 
831
<hr>
 
832
<div class="refsect2" lang="en">
 
833
<a name="gnome-vfs-get-volume-free-space"></a><h3>gnome_vfs_get_volume_free_space ()</h3>
 
834
<pre class="programlisting"><a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_get_volume_free_space     (const <a class="link" href="gnome-vfs-2.0-gnome-vfs-uri.html#GnomeVFSURI" title="GnomeVFSURI">GnomeVFSURI</a> *vfs_uri,
 
835
                                                         <a class="link" href="gnome-vfs-2.0-gnome-vfs-file-size.html#GnomeVFSFileSize" title="GnomeVFSFileSize">GnomeVFSFileSize</a> *size);</pre>
 
836
<p>
 
837
Stores the amount of free space in bytes on <em class="parameter"><code>vfs</code></em>-uri's
 
838
volume in <em class="parameter"><code>size</code></em>.</p>
 
839
<p>
 
840
</p>
 
841
<div class="variablelist"><table border="0">
 
842
<col align="left" valign="top">
 
843
<tbody>
 
844
<tr>
 
845
<td><p><span class="term"><em class="parameter"><code>vfs_uri</code></em> :</span></p></td>
 
846
<td> a <span class="type">GnomeVFSURI.</span>
 
847
</td>
 
848
</tr>
 
849
<tr>
 
850
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
 
851
<td> a <span class="type">GnomeVFSFileSize.</span>
 
852
</td>
 
853
</tr>
 
854
<tr>
 
855
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
856
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a> on success, otherwise an
 
857
<code class="literal">GNOME_VFS_ERROR_</code>* code.
 
858
</td>
 
859
</tr>
 
860
</tbody>
 
861
</table></div>
 
862
</div>
 
863
<hr>
 
864
<div class="refsect2" lang="en">
 
865
<a name="gnome-vfs-icon-path-from-filename"></a><h3>gnome_vfs_icon_path_from_filename ()</h3>
 
866
<pre class="programlisting">char *              gnome_vfs_icon_path_from_filename   (const char *filename);</pre>
 
867
<p>
 
868
</p>
 
869
<div class="variablelist"><table border="0">
 
870
<col align="left" valign="top">
 
871
<tbody>
 
872
<tr>
 
873
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
 
874
<td> path to a file. Could be relative or absolute path.
 
875
</td>
 
876
</tr>
 
877
<tr>
 
878
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
879
<td> Returns the icon path for the <em class="parameter"><code>filename</code></em>. Example:
 
880
gnome_vfs_icon_path_from_filename ("nautilus/nautilus-desktop.png") will return a string 
 
881
forming the full path of the file nautilus-desktop.png ie $PREFIX/share/pixmaps/nautilus/nautilus-desktop.png.
 
882
</td>
 
883
</tr>
 
884
</tbody>
 
885
</table></div>
 
886
</div>
 
887
<hr>
 
888
<div class="refsect2" lang="en">
 
889
<a name="gnome-vfs-is-primary-thread"></a><h3>gnome_vfs_is_primary_thread ()</h3>
 
890
<pre class="programlisting">gboolean            gnome_vfs_is_primary_thread         (void);</pre>
 
891
<p>
 
892
Check if the current thread is the thread with the main glib event loop.</p>
 
893
<p>
 
894
</p>
 
895
<div class="variablelist"><table border="0">
 
896
<col align="left" valign="top">
 
897
<tbody><tr>
 
898
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
899
<td> <code class="literal">TRUE</code> if the current thread is the thread with the 
 
900
main glib event loop.
 
901
</td>
 
902
</tr></tbody>
 
903
</table></div>
 
904
</div>
 
905
<hr>
 
906
<div class="refsect2" lang="en">
 
907
<a name="gnome-vfs-get-uri-scheme"></a><h3>gnome_vfs_get_uri_scheme ()</h3>
 
908
<pre class="programlisting">char *              gnome_vfs_get_uri_scheme            (const char *uri);</pre>
 
909
<p>
 
910
Retrieve the scheme used in <em class="parameter"><code>uri</code></em>.</p>
 
911
<p>
 
912
</p>
 
913
<div class="variablelist"><table border="0">
 
914
<col align="left" valign="top">
 
915
<tbody>
 
916
<tr>
 
917
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
918
<td> a stringified uri.
 
919
</td>
 
920
</tr>
 
921
<tr>
 
922
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
923
<td> a newly allocated string containing the scheme, <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>
 
924
if <em class="parameter"><code>uri</code></em> doesn't contain a scheme.
 
925
 
 
926
</td>
 
927
</tr>
 
928
</tbody>
 
929
</table></div>
 
930
<p class="since">Since 2.2</p>
 
931
</div>
 
932
<hr>
 
933
<div class="refsect2" lang="en">
 
934
<a name="gnome-vfs-uris-match"></a><h3>gnome_vfs_uris_match ()</h3>
 
935
<pre class="programlisting">gboolean            gnome_vfs_uris_match                (const char *uri_1,
 
936
                                                         const char *uri_2);</pre>
 
937
<p>
 
938
Compare two uris.</p>
 
939
<p>
 
940
</p>
 
941
<div class="variablelist"><table border="0">
 
942
<col align="left" valign="top">
 
943
<tbody>
 
944
<tr>
 
945
<td><p><span class="term"><em class="parameter"><code>uri_1</code></em> :</span></p></td>
 
946
<td> stringified uri to compare with <em class="parameter"><code>uri_2</code></em>.
 
947
</td>
 
948
</tr>
 
949
<tr>
 
950
<td><p><span class="term"><em class="parameter"><code>uri_2</code></em> :</span></p></td>
 
951
<td> stringified uri to compare with <em class="parameter"><code>uri_1</code></em>.
 
952
</td>
 
953
</tr>
 
954
<tr>
 
955
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
956
<td> <code class="literal">TRUE</code> if they are the same, <code class="literal">FALSE</code> otherwise.
 
957
 
 
958
</td>
 
959
</tr>
 
960
</tbody>
 
961
</table></div>
 
962
<p class="since">Since 2.2</p>
 
963
</div>
 
964
<hr>
 
965
<div class="refsect2" lang="en">
 
966
<a name="GNOME-VFS-ASSERT-PRIMARY-THREAD:CAPS"></a><h3>GNOME_VFS_ASSERT_PRIMARY_THREAD</h3>
 
967
<pre class="programlisting">#define GNOME_VFS_ASSERT_PRIMARY_THREAD g_assert (gnome_vfs_is_primary_thread())
 
968
</pre>
 
969
<p>
 
970
Asserts that the current thread is the thread with 
 
971
the main glib event loop</p>
 
972
<p>
 
973
</p>
 
974
</div>
 
975
<hr>
 
976
<div class="refsect2" lang="en">
 
977
<a name="GNOME-VFS-ASSERT-SECONDARY-THREAD:CAPS"></a><h3>GNOME_VFS_ASSERT_SECONDARY_THREAD</h3>
 
978
<pre class="programlisting">#define GNOME_VFS_ASSERT_SECONDARY_THREAD g_assert (!gnome_vfs_is_primary_thread())
 
979
</pre>
 
980
<p>
 
981
Asserts that the current thread is NOT the thread with
 
982
the main glib event loop</p>
 
983
<p>
 
984
</p>
 
985
</div>
 
986
<hr>
 
987
<div class="refsect2" lang="en">
 
988
<a name="gnome-vfs-open-fd"></a><h3>gnome_vfs_open_fd ()</h3>
 
989
<pre class="programlisting"><a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_open_fd                   (GnomeVFSHandle **handle,
 
990
                                                         int filedes);</pre>
 
991
<p>
 
992
Converts an open unix file descript into a GnomeVFSHandle that 
 
993
can be used with the normal GnomeVFS file operations. When the
 
994
handle is closed the file descriptor will also be closed.</p>
 
995
<p>
 
996
</p>
 
997
<div class="variablelist"><table border="0">
 
998
<col align="left" valign="top">
 
999
<tbody>
 
1000
<tr>
 
1001
<td><p><span class="term"><em class="parameter"><code>handle</code></em> :</span></p></td>
 
1002
<td> A pointer to a pointer to a GnomeVFSHandle object
 
1003
</td>
 
1004
</tr>
 
1005
<tr>
 
1006
<td><p><span class="term"><em class="parameter"><code>filedes</code></em> :</span></p></td>
 
1007
<td> a UNIX file descriptor
 
1008
</td>
 
1009
</tr>
 
1010
<tr>
 
1011
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
1012
<td> <a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GNOME-VFS-OK:CAPS"><code class="literal">GNOME_VFS_OK</code></a> if the open was ok, a suitable error otherwise.
 
1013
 
 
1014
Since 2.2
 
1015
</td>
 
1016
</tr>
 
1017
</tbody>
 
1018
</table></div>
 
1019
</div>
 
1020
<hr>
 
1021
<div class="refsect2" lang="en">
 
1022
<a name="gnome-vfs-read-entire-file"></a><h3>gnome_vfs_read_entire_file ()</h3>
 
1023
<pre class="programlisting"><a class="link" href="gnome-vfs-2.0-gnome-vfs-result.html#GnomeVFSResult" title="enum GnomeVFSResult">GnomeVFSResult</a>      gnome_vfs_read_entire_file          (const char *uri,
 
1024
                                                         int *file_size,
 
1025
                                                         char **file_contents);</pre>
 
1026
<p>
 
1027
Reads an entire file into memory for convenience. Beware accidentally
 
1028
loading large files into memory with this function.
 
1029
</p>
 
1030
<p>
 
1031
Since version 2.10 the string stored in <em class="parameter"><code>file_contents</code></em> will be null-terminated,
 
1032
so for text files you can use result as a normal string.</p>
 
1033
<p>
 
1034
</p>
 
1035
<div class="variablelist"><table border="0">
 
1036
<col align="left" valign="top">
 
1037
<tbody>
 
1038
<tr>
 
1039
<td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
 
1040
<td> uri of the file to read.
 
1041
</td>
 
1042
</tr>
 
1043
<tr>
 
1044
<td><p><span class="term"><em class="parameter"><code>file_size</code></em> :</span></p></td>
 
1045
<td> after reading the file, contains the size of the file read.
 
1046
</td>
 
1047
</tr>
 
1048
<tr>
 
1049
<td><p><span class="term"><em class="parameter"><code>file_contents</code></em> :</span></p></td>
 
1050
<td> contains the file_size bytes, the contents of the file at <em class="parameter"><code>uri</code></em>.
 
1051
</td>
 
1052
</tr>
 
1053
<tr>
 
1054
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
 
1055
<td> an integer representing the result of the operation.
 
1056
 
 
1057
</td>
 
1058
</tr>
 
1059
</tbody>
 
1060
</table></div>
 
1061
<p class="since">Since 2.2</p>
 
1062
</div>
 
1063
</div>
 
1064
</div>
 
1065
<div class="footer">
 
1066
<hr>
 
1067
          Generated by GTK-Doc V1.12</div>
 
1068
</body>
 
1069
</html>