4 >File Operations</TITLE
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
10 TITLE="GnomeVFS - Filesystem Abstraction library"
11 HREF="index.html"><LINK
14 HREF="file-operations.html"><LINK
16 TITLE="Initialization/Shutdown"
17 HREF="gnome-vfs-gnome-vfs-init.html"><LINK
19 TITLE="Asynchronous File Operations"
20 HREF="gnome-vfs-gnome-vfs-async-ops.html"><META
22 CONTENT="GTK-Doc V0.10 (SGML mode)"><STYLE
24 >.synopsis, .classsynopsis {
26 border: solid 1px #aaaaaa;
31 border: solid 1px #aaaaff;
40 border: solid 1px #ffaaaa;
47 .navigation a:visited {
64 SUMMARY="Navigation header"
72 HREF="gnome-vfs-gnome-vfs-init.html"
83 HREF="file-operations.html"
105 >GnomeVFS - Filesystem Abstraction library</TH
109 HREF="gnome-vfs-gnome-vfs-async-ops.html"
121 NAME="GNOME-VFS-GNOME-VFS-OPS"
131 >File Operations -- basic POSIX-style file operations</DIV
133 CLASS="REFSYNOPSISDIV"
144 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
147 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-OPEN"
149 > (GnomeVFSHandle **handle,
150 const gchar *text_uri,
152 HREF="gnome-vfs-gnome-vfs-ops.html#GNOMEVFSOPENMODE"
156 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
159 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-OPEN-URI"
160 >gnome_vfs_open_uri</A
161 > (GnomeVFSHandle **handle,
164 HREF="gnome-vfs-gnome-vfs-ops.html#GNOMEVFSOPENMODE"
168 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
171 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-CREATE"
173 > (GnomeVFSHandle **handle,
174 const gchar *text_uri,
176 HREF="gnome-vfs-gnome-vfs-ops.html#GNOMEVFSOPENMODE"
182 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
185 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-CREATE-URI"
186 >gnome_vfs_create_uri</A
187 > (GnomeVFSHandle **handle,
190 HREF="gnome-vfs-gnome-vfs-ops.html#GNOMEVFSOPENMODE"
196 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
199 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-CLOSE"
201 > (GnomeVFSHandle *handle);
203 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
206 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-READ"
208 > (GnomeVFSHandle *handle,
211 HREF="gnome-vfs-gnome-vfs-file-size.html#GNOMEVFSFILESIZE"
215 HREF="gnome-vfs-gnome-vfs-file-size.html#GNOMEVFSFILESIZE"
219 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
222 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-WRITE"
224 > (GnomeVFSHandle *handle,
225 gconstpointer buffer,
227 HREF="gnome-vfs-gnome-vfs-file-size.html#GNOMEVFSFILESIZE"
231 HREF="gnome-vfs-gnome-vfs-file-size.html#GNOMEVFSFILESIZE"
235 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
238 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-SEEK"
240 > (GnomeVFSHandle *handle,
242 HREF="gnome-vfs-gnome-vfs-ops.html#GNOMEVFSSEEKPOSITION"
243 >GnomeVFSSeekPosition</A
246 HREF="gnome-vfs-gnome-vfs-file-size.html#GNOMEVFSFILEOFFSET"
247 >GnomeVFSFileOffset</A
250 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
253 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-TELL"
255 > (GnomeVFSHandle *handle,
257 HREF="gnome-vfs-gnome-vfs-file-size.html#GNOMEVFSFILESIZE"
261 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
264 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-GET-FILE-INFO"
265 >gnome_vfs_get_file_info</A
266 > (const gchar *text_uri,
268 HREF="gnome-vfs-gnome-vfs-file-info.html#GNOMEVFSFILEINFO"
272 HREF="gnome-vfs-gnome-vfs-file-info.html#GNOMEVFSFILEINFOOPTIONS"
273 >GnomeVFSFileInfoOptions</A
276 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
279 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-GET-FILE-INFO-URI"
280 >gnome_vfs_get_file_info_uri</A
283 HREF="gnome-vfs-gnome-vfs-file-info.html#GNOMEVFSFILEINFO"
287 HREF="gnome-vfs-gnome-vfs-file-info.html#GNOMEVFSFILEINFOOPTIONS"
288 >GnomeVFSFileInfoOptions</A
291 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
294 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-GET-FILE-INFO-FROM-HANDLE"
295 >gnome_vfs_get_file_info_from_handle</A
297 (GnomeVFSHandle *handle,
299 HREF="gnome-vfs-gnome-vfs-file-info.html#GNOMEVFSFILEINFO"
303 HREF="gnome-vfs-gnome-vfs-file-info.html#GNOMEVFSFILEINFOOPTIONS"
304 >GnomeVFSFileInfoOptions</A
307 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
310 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-TRUNCATE"
311 >gnome_vfs_truncate</A
312 > (const gchar *text_uri,
314 HREF="gnome-vfs-gnome-vfs-file-size.html#GNOMEVFSFILESIZE"
318 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
321 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-TRUNCATE-URI"
322 >gnome_vfs_truncate_uri</A
325 HREF="gnome-vfs-gnome-vfs-file-size.html#GNOMEVFSFILESIZE"
329 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
332 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-TRUNCATE-HANDLE"
333 >gnome_vfs_truncate_handle</A
334 > (GnomeVFSHandle *handle,
336 HREF="gnome-vfs-gnome-vfs-file-size.html#GNOMEVFSFILESIZE"
340 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
343 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-UNLINK-FROM-URI"
344 >gnome_vfs_unlink_from_uri</A
345 > (GnomeVFSURI *uri);
347 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
350 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-CREATE-SYMBOLIC-LINK"
351 >gnome_vfs_create_symbolic_link</A
354 const gchar *target_reference);
356 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
359 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-UNLINK"
361 > (const gchar *text_uri);
363 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
366 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-MOVE-URI"
367 >gnome_vfs_move_uri</A
368 > (GnomeVFSURI *old_uri,
369 GnomeVFSURI *new_uri,
370 gboolean force_replace);
372 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
375 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-MOVE"
377 > (const gchar *old_text_uri,
378 const gchar *new_text_uri,
379 gboolean force_replace);
381 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
384 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-CHECK-SAME-FS-URIS"
385 >gnome_vfs_check_same_fs_uris</A
386 > (GnomeVFSURI *source_uri,
387 GnomeVFSURI *target_uri,
388 gboolean *same_fs_return);
390 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
393 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-CHECK-SAME-FS"
394 >gnome_vfs_check_same_fs</A
395 > (const gchar *source,
397 gboolean *same_fs_return);
399 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-URI-EXISTS"
400 >gnome_vfs_uri_exists</A
401 > (GnomeVFSURI *uri);
403 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
406 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-SET-FILE-INFO-URI"
407 >gnome_vfs_set_file_info_uri</A
410 HREF="gnome-vfs-gnome-vfs-file-info.html#GNOMEVFSFILEINFO"
414 HREF="gnome-vfs-gnome-vfs-file-info.html#GNOMEVFSSETFILEINFOMASK"
415 >GnomeVFSSetFileInfoMask</A
418 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
421 HREF="gnome-vfs-gnome-vfs-ops.html#GNOME-VFS-SET-FILE-INFO"
422 >gnome_vfs_set_file_info</A
423 > (const gchar *text_uri,
425 HREF="gnome-vfs-gnome-vfs-file-info.html#GNOMEVFSFILEINFO"
429 HREF="gnome-vfs-gnome-vfs-file-info.html#GNOMEVFSSETFILEINFOMASK"
430 >GnomeVFSSetFileInfoMask</A
433 HREF="gnome-vfs-gnome-vfs-ops.html#GNOMEVFSMETHODHANDLE"
434 >GnomeVFSMethodHandle</A
437 HREF="gnome-vfs-gnome-vfs-ops.html#GNOMEVFSOPENMODE"
441 HREF="gnome-vfs-gnome-vfs-ops.html#GNOMEVFSSEEKPOSITION"
442 >GnomeVFSSeekPosition</A
469 NAME="GNOME-VFS-OPEN"
471 >gnome_vfs_open ()</H3
473 CLASS="PROGRAMLISTING"
475 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
477 > gnome_vfs_open (GnomeVFSHandle **handle,
478 const gchar *text_uri,
480 HREF="gnome-vfs-gnome-vfs-ops.html#GNOMEVFSOPENMODE"
489 > according to mode <TT
500 contain a pointer to a handle for the open file.</P
517 STYLE="white-space: nowrap"
529 > A pointer to a pointer to a GnomeVFSHandle object</P
538 STYLE="white-space: nowrap"
550 > String representing the URI to open</P
559 STYLE="white-space: nowrap"
580 STYLE="white-space: nowrap"
593 > An integer representing the result of the operation</P
606 NAME="GNOME-VFS-OPEN-URI"
608 >gnome_vfs_open_uri ()</H3
610 CLASS="PROGRAMLISTING"
612 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
614 > gnome_vfs_open_uri (GnomeVFSHandle **handle,
617 HREF="gnome-vfs-gnome-vfs-ops.html#GNOMEVFSOPENMODE"
626 > according to mode <TT
637 contain a pointer to a handle for the open file.</P
654 STYLE="white-space: nowrap"
666 > A pointer to a pointer to a GnomeVFSHandle object</P
675 STYLE="white-space: nowrap"
696 STYLE="white-space: nowrap"
717 STYLE="white-space: nowrap"
730 > An integer representing the result of the operation</P
743 NAME="GNOME-VFS-CREATE"
745 >gnome_vfs_create ()</H3
747 CLASS="PROGRAMLISTING"
749 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
751 > gnome_vfs_create (GnomeVFSHandle **handle,
752 const gchar *text_uri,
754 HREF="gnome-vfs-gnome-vfs-ops.html#GNOMEVFSOPENMODE"
765 > according to mode <TT
776 contain a pointer to a handle for the open file.</P
793 STYLE="white-space: nowrap"
805 > A pointer to a pointer to a GnomeVFSHandle object</P
814 STYLE="white-space: nowrap"
826 > String representing the URI to create</P
835 STYLE="white-space: nowrap"
847 > mode to leave the file opened in after creation (or <TT
849 >GNOME_VFS_OPEN_MODE_NONE</TT
851 to leave the file closed after creation)</P
860 STYLE="white-space: nowrap"
872 > Whether the file should be created in "exclusive" mode:
873 i.e. if this flag is nonzero, operation will fail if a file with the
874 same name already exists.</P
883 STYLE="white-space: nowrap"
895 > Bitmap representing the permissions for the newly created file
905 STYLE="white-space: nowrap"
918 > An integer representing the result of the operation</P
931 NAME="GNOME-VFS-CREATE-URI"
933 >gnome_vfs_create_uri ()</H3
935 CLASS="PROGRAMLISTING"
937 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
939 > gnome_vfs_create_uri (GnomeVFSHandle **handle,
942 HREF="gnome-vfs-gnome-vfs-ops.html#GNOMEVFSOPENMODE"
953 > according to mode <TT
964 contain a pointer to a handle for the open file.</P
981 STYLE="white-space: nowrap"
993 > A pointer to a pointer to a GnomeVFSHandle object</P
1002 STYLE="white-space: nowrap"
1014 > URI for the file to create</P
1023 STYLE="white-space: nowrap"
1044 STYLE="white-space: nowrap"
1056 > Whether the file should be created in "exclusive" mode:
1057 i.e. if this flag is nonzero, operation will fail if a file with the
1058 same name already exists.</P
1067 STYLE="white-space: nowrap"
1079 > Bitmap representing the permissions for the newly created file
1089 STYLE="white-space: nowrap"
1102 > An integer representing the result of the operation</P
1115 NAME="GNOME-VFS-CLOSE"
1117 >gnome_vfs_close ()</H3
1119 CLASS="PROGRAMLISTING"
1121 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
1123 > gnome_vfs_close (GnomeVFSHandle *handle);</PRE
1125 >Close file associated with <TT
1136 CLASS="variablelist"
1147 STYLE="white-space: nowrap"
1159 > A pointer to a GnomeVFSHandle object</P
1168 STYLE="white-space: nowrap"
1181 > An integer representing the result of the operation.</P
1194 NAME="GNOME-VFS-READ"
1196 >gnome_vfs_read ()</H3
1198 CLASS="PROGRAMLISTING"
1200 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
1202 > gnome_vfs_read (GnomeVFSHandle *handle,
1205 HREF="gnome-vfs-gnome-vfs-file-size.html#GNOMEVFSFILESIZE"
1206 >GnomeVFSFileSize</A
1209 HREF="gnome-vfs-gnome-vfs-file-size.html#GNOMEVFSFILESIZE"
1210 >GnomeVFSFileSize</A
1211 > *bytes_read);</PRE
1223 >. As with Unix system calls, the number of
1224 bytes read can effectively be less than <TT
1229 > on return and will be
1241 CLASS="variablelist"
1252 STYLE="white-space: nowrap"
1264 > Handle of the file to read data from</P
1273 STYLE="white-space: nowrap"
1285 > Pointer to a buffer that must be at least <TT
1299 STYLE="white-space: nowrap"
1311 > Number of bytes to read</P
1320 STYLE="white-space: nowrap"
1332 > Pointer to a variable that will hold the number of bytes
1333 effectively read on return.</P
1342 STYLE="white-space: nowrap"
1355 > An integer representing the result of the operation</P
1368 NAME="GNOME-VFS-WRITE"
1370 >gnome_vfs_write ()</H3
1372 CLASS="PROGRAMLISTING"
1374 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
1376 > gnome_vfs_write (GnomeVFSHandle *handle,
1377 gconstpointer buffer,
1379 HREF="gnome-vfs-gnome-vfs-file-size.html#GNOMEVFSFILESIZE"
1380 >GnomeVFSFileSize</A
1383 HREF="gnome-vfs-gnome-vfs-file-size.html#GNOMEVFSFILESIZE"
1384 >GnomeVFSFileSize</A
1385 > *bytes_written);</PRE
1392 > into the file opened through <TT
1397 >. As with Unix system
1398 calls, the number of bytes written can effectively be less than <TT
1404 return and will be stored in <TT
1415 CLASS="variablelist"
1426 STYLE="white-space: nowrap"
1438 > Handle of the file to write data to</P
1447 STYLE="white-space: nowrap"
1459 > Pointer to the buffer containing the data to be written</P
1468 STYLE="white-space: nowrap"
1480 > Number of bytes to write</P
1489 STYLE="white-space: nowrap"
1501 > Pointer to a variable that will hold the number of bytes
1502 effectively written on return.</P
1511 STYLE="white-space: nowrap"
1524 > An integer representing the result of the operation</P
1537 NAME="GNOME-VFS-SEEK"
1539 >gnome_vfs_seek ()</H3
1541 CLASS="PROGRAMLISTING"
1543 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
1545 > gnome_vfs_seek (GnomeVFSHandle *handle,
1547 HREF="gnome-vfs-gnome-vfs-ops.html#GNOMEVFSSEEKPOSITION"
1548 >GnomeVFSSeekPosition</A
1551 HREF="gnome-vfs-gnome-vfs-file-size.html#GNOMEVFSFILEOFFSET"
1552 >GnomeVFSFileOffset</A
1555 >Set the current position for reading/writing through <TT
1566 CLASS="variablelist"
1577 STYLE="white-space: nowrap"
1589 > Handle for which the current position must be changed</P
1598 STYLE="white-space: nowrap"
1610 > Integer value representing the starting position</P
1619 STYLE="white-space: nowrap"
1631 > Number of bytes to skip from the position specified by <TT
1637 (a positive value means to move forward; a negative one to move backwards)</P
1646 STYLE="white-space: nowrap"
1672 NAME="GNOME-VFS-TELL"
1674 >gnome_vfs_tell ()</H3
1676 CLASS="PROGRAMLISTING"
1678 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
1680 > gnome_vfs_tell (GnomeVFSHandle *handle,
1682 HREF="gnome-vfs-gnome-vfs-file-size.html#GNOMEVFSFILESIZE"
1683 >GnomeVFSFileSize</A
1684 > *offset_return);</PRE
1686 >Return the current position on <TT
1691 >. This is the point in the file
1692 pointed to by handle that reads and writes will occur on.</P
1698 CLASS="variablelist"
1709 STYLE="white-space: nowrap"
1721 > Handle for which the current position must be retrieved</P
1730 STYLE="white-space: nowrap"
1742 > Pointer to a variable that will contain the current position
1752 STYLE="white-space: nowrap"
1765 > An integer representing the result of the operation</P
1778 NAME="GNOME-VFS-GET-FILE-INFO"
1780 >gnome_vfs_get_file_info ()</H3
1782 CLASS="PROGRAMLISTING"
1784 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
1786 > gnome_vfs_get_file_info (const gchar *text_uri,
1788 HREF="gnome-vfs-gnome-vfs-file-info.html#GNOMEVFSFILEINFO"
1789 >GnomeVFSFileInfo</A
1792 HREF="gnome-vfs-gnome-vfs-file-info.html#GNOMEVFSFILEINFOOPTIONS"
1793 >GnomeVFSFileInfoOptions</A
1796 >Retrieve information about <TT
1801 >. The information will be stored in
1813 CLASS="variablelist"
1824 STYLE="white-space: nowrap"
1836 > URI of the file for which information will be retrieved</P
1845 STYLE="white-space: nowrap"
1857 > Pointer to a GnomeVFSFileInfo object that will hold the information
1858 for the file on return</P
1867 STYLE="white-space: nowrap"
1879 > Options for retrieving file information
1880 to retrieve for the file</P
1889 STYLE="white-space: nowrap"
1902 > An integer representing the result of the operation</P
1915 NAME="GNOME-VFS-GET-FILE-INFO-URI"
1917 >gnome_vfs_get_file_info_uri ()</H3
1919 CLASS="PROGRAMLISTING"
1921 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
1923 > gnome_vfs_get_file_info_uri (GnomeVFSURI *uri,
1925 HREF="gnome-vfs-gnome-vfs-file-info.html#GNOMEVFSFILEINFO"
1926 >GnomeVFSFileInfo</A
1929 HREF="gnome-vfs-gnome-vfs-file-info.html#GNOMEVFSFILEINFOOPTIONS"
1930 >GnomeVFSFileInfoOptions</A
1933 >Retrieve information about <TT
1938 >. The information will be stored in
1950 CLASS="variablelist"
1961 STYLE="white-space: nowrap"
1973 > URI of the file for which information will be retrieved</P
1982 STYLE="white-space: nowrap"
1994 > Pointer to a GnomeVFSFileInfo object that will hold the information
1995 for the file on return</P
2004 STYLE="white-space: nowrap"
2016 > Options for retrieving file information
2017 to retrieve for the file</P
2026 STYLE="white-space: nowrap"
2039 > An integer representing the result of the operation</P
2052 NAME="GNOME-VFS-GET-FILE-INFO-FROM-HANDLE"
2054 >gnome_vfs_get_file_info_from_handle ()</H3
2056 CLASS="PROGRAMLISTING"
2058 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
2060 > gnome_vfs_get_file_info_from_handle
2061 (GnomeVFSHandle *handle,
2063 HREF="gnome-vfs-gnome-vfs-file-info.html#GNOMEVFSFILEINFO"
2064 >GnomeVFSFileInfo</A
2067 HREF="gnome-vfs-gnome-vfs-file-info.html#GNOMEVFSFILEINFOOPTIONS"
2068 >GnomeVFSFileInfoOptions</A
2071 >Retrieve information about an open file. The information will be stored in
2083 CLASS="variablelist"
2094 STYLE="white-space: nowrap"
2106 > Handle of the file for which information must be retrieved</P
2115 STYLE="white-space: nowrap"
2127 > Pointer to a GnomeVFSFileInfo object that will hold the information
2128 for the file on return</P
2137 STYLE="white-space: nowrap"
2149 > Options for retrieving file information
2150 to retrieve for the file</P
2159 STYLE="white-space: nowrap"
2172 > An integer representing the result of the operation</P
2185 NAME="GNOME-VFS-TRUNCATE"
2187 >gnome_vfs_truncate ()</H3
2189 CLASS="PROGRAMLISTING"
2191 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
2193 > gnome_vfs_truncate (const gchar *text_uri,
2195 HREF="gnome-vfs-gnome-vfs-file-size.html#GNOMEVFSFILESIZE"
2196 >GnomeVFSFileSize</A
2199 >Truncate the file at <TT
2215 CLASS="variablelist"
2226 STYLE="white-space: nowrap"
2238 > URI of the file to be truncated</P
2247 STYLE="white-space: nowrap"
2259 > length of the new file at <TT
2273 STYLE="white-space: nowrap"
2286 > An integer representing the result of the operation</P
2299 NAME="GNOME-VFS-TRUNCATE-URI"
2301 >gnome_vfs_truncate_uri ()</H3
2303 CLASS="PROGRAMLISTING"
2305 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
2307 > gnome_vfs_truncate_uri (GnomeVFSURI *uri,
2309 HREF="gnome-vfs-gnome-vfs-file-size.html#GNOMEVFSFILESIZE"
2310 >GnomeVFSFileSize</A
2313 >Truncate the file at <TT
2323 > bytes. Data past <TT
2329 bytes will be discarded.</P
2335 CLASS="variablelist"
2346 STYLE="white-space: nowrap"
2358 > URI of the file to be truncated</P
2367 STYLE="white-space: nowrap"
2379 > length of the new file at <TT
2393 STYLE="white-space: nowrap"
2406 > An integer representing the result of the operation</P
2419 NAME="GNOME-VFS-TRUNCATE-HANDLE"
2421 >gnome_vfs_truncate_handle ()</H3
2423 CLASS="PROGRAMLISTING"
2425 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
2427 > gnome_vfs_truncate_handle (GnomeVFSHandle *handle,
2429 HREF="gnome-vfs-gnome-vfs-file-size.html#GNOMEVFSFILESIZE"
2430 >GnomeVFSFileSize</A
2433 >Truncate the file pointed to be <TT
2449 > bytes will be discarded.</P
2455 CLASS="variablelist"
2466 STYLE="white-space: nowrap"
2478 > a handle to the file to be truncated</P
2487 STYLE="white-space: nowrap"
2499 > length of the new file the handle is open to</P
2508 STYLE="white-space: nowrap"
2521 > An integer representing the result of the operation</P
2534 NAME="GNOME-VFS-UNLINK-FROM-URI"
2536 >gnome_vfs_unlink_from_uri ()</H3
2538 CLASS="PROGRAMLISTING"
2540 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
2542 > gnome_vfs_unlink_from_uri (GnomeVFSURI *uri);</PRE
2549 > (i.e. delete the file).</P
2555 CLASS="variablelist"
2566 STYLE="white-space: nowrap"
2578 > URI of the file to be unlinked</P
2587 STYLE="white-space: nowrap"
2600 > An integer representing the result of the operation</P
2613 NAME="GNOME-VFS-CREATE-SYMBOLIC-LINK"
2615 >gnome_vfs_create_symbolic_link ()</H3
2617 CLASS="PROGRAMLISTING"
2619 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
2621 > gnome_vfs_create_symbolic_link
2623 const gchar *target_reference);</PRE
2625 >Creates a symbolic link, or eventually, a URI link (as necessary)
2634 >target_reference</I
2642 CLASS="variablelist"
2653 STYLE="white-space: nowrap"
2665 > URI to create a link at</P
2674 STYLE="white-space: nowrap"
2678 >target_reference</I
2686 > URI "reference" to point the link to (URI or relative path)</P
2695 STYLE="white-space: nowrap"
2708 > An integer representing the result of the operation</P
2721 NAME="GNOME-VFS-UNLINK"
2723 >gnome_vfs_unlink ()</H3
2725 CLASS="PROGRAMLISTING"
2727 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
2729 > gnome_vfs_unlink (const gchar *text_uri);</PRE
2736 > (i.e. delete the file).</P
2742 CLASS="variablelist"
2753 STYLE="white-space: nowrap"
2765 > URI of the file to be unlinked</P
2774 STYLE="white-space: nowrap"
2787 > An integer representing the result of the operation</P
2800 NAME="GNOME-VFS-MOVE-URI"
2802 >gnome_vfs_move_uri ()</H3
2804 CLASS="PROGRAMLISTING"
2806 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
2808 > gnome_vfs_move_uri (GnomeVFSURI *old_uri,
2809 GnomeVFSURI *new_uri,
2810 gboolean force_replace);</PRE
2812 >Move a file from URI <TT
2822 >. This will only work if <TT
2833 > are on the same file system. Otherwise, it is necessary
2834 to use the more general %<A
2835 HREF="gnome-vfs-gnome-vfs-xfer.html#GNOME-VFS-XFER-URI"
2836 >gnome_vfs_xfer_uri</A
2843 CLASS="variablelist"
2854 STYLE="white-space: nowrap"
2875 STYLE="white-space: nowrap"
2887 > Destination URI</P
2896 STYLE="white-space: nowrap"
2911 >, move target to <TT
2917 is already a file at <TT
2922 >. If there is a file, it will be discarded.</P
2931 STYLE="white-space: nowrap"
2944 > An integer representing the result of the operation.</P
2957 NAME="GNOME-VFS-MOVE"
2959 >gnome_vfs_move ()</H3
2961 CLASS="PROGRAMLISTING"
2963 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
2965 > gnome_vfs_move (const gchar *old_text_uri,
2966 const gchar *new_text_uri,
2967 gboolean force_replace);</PRE
2969 >Move a file from URI <TT
2979 >. This will only work
2990 > are on the same file system. Otherwise,
2991 it is necessary to use the more general %<A
2992 HREF="gnome-vfs-gnome-vfs-xfer.html#GNOME-VFS-XFER-URI"
2993 >gnome_vfs_xfer_uri</A
3000 CLASS="variablelist"
3011 STYLE="white-space: nowrap"
3032 STYLE="white-space: nowrap"
3044 > Destination URI</P
3053 STYLE="white-space: nowrap"
3068 >, perform the operation even if it unlinks an existing
3083 STYLE="white-space: nowrap"
3096 > An integer representing the result of the operation.</P
3109 NAME="GNOME-VFS-CHECK-SAME-FS-URIS"
3111 >gnome_vfs_check_same_fs_uris ()</H3
3113 CLASS="PROGRAMLISTING"
3115 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
3117 > gnome_vfs_check_same_fs_uris (GnomeVFSURI *source_uri,
3118 GnomeVFSURI *target_uri,
3119 gboolean *same_fs_return);</PRE
3131 > are on the same file system.</P
3137 CLASS="variablelist"
3148 STYLE="white-space: nowrap"
3169 STYLE="white-space: nowrap"
3190 STYLE="white-space: nowrap"
3202 > Pointer to a boolean variable which will be set to <TT
3216 > are on the same file system on return.</P
3225 STYLE="white-space: nowrap"
3238 > An integer representing the result of the operation.</P
3251 NAME="GNOME-VFS-CHECK-SAME-FS"
3253 >gnome_vfs_check_same_fs ()</H3
3255 CLASS="PROGRAMLISTING"
3257 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
3259 > gnome_vfs_check_same_fs (const gchar *source,
3260 const gchar *target,
3261 gboolean *same_fs_return);</PRE
3276 > are on the same file system.</P
3282 CLASS="variablelist"
3293 STYLE="white-space: nowrap"
3314 STYLE="white-space: nowrap"
3335 STYLE="white-space: nowrap"
3347 > Pointer to a boolean variable which will be set to <TT
3359 STYLE="white-space: nowrap"
3372 > An integer representing the result of the operation.</P
3385 NAME="GNOME-VFS-URI-EXISTS"
3387 >gnome_vfs_uri_exists ()</H3
3389 CLASS="PROGRAMLISTING"
3390 >gboolean gnome_vfs_uri_exists (GnomeVFSURI *uri);</PRE
3392 >Check if the URI points to an existing entity.</P
3398 CLASS="variablelist"
3408 NAME="AEN1005"><SPAN
3409 STYLE="white-space: nowrap"
3429 NAME="AEN1010"><SPAN
3430 STYLE="white-space: nowrap"
3443 > TRUE if URI exists.</P
3456 NAME="GNOME-VFS-SET-FILE-INFO-URI"
3458 >gnome_vfs_set_file_info_uri ()</H3
3460 CLASS="PROGRAMLISTING"
3462 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
3464 > gnome_vfs_set_file_info_uri (GnomeVFSURI *uri,
3466 HREF="gnome-vfs-gnome-vfs-file-info.html#GNOMEVFSFILEINFO"
3467 >GnomeVFSFileInfo</A
3470 HREF="gnome-vfs-gnome-vfs-file-info.html#GNOMEVFSSETFILEINFOMASK"
3471 >GnomeVFSSetFileInfoMask</A
3474 >Set file information for <TT
3479 >; only the information for which the
3480 corresponding bit in <TT
3485 > is set is actually modified.</P
3491 CLASS="variablelist"
3501 NAME="AEN1028"><SPAN
3502 STYLE="white-space: nowrap"
3522 NAME="AEN1033"><SPAN
3523 STYLE="white-space: nowrap"
3535 > Information that must be set for the file</P
3543 NAME="AEN1038"><SPAN
3544 STYLE="white-space: nowrap"
3556 > Bit mask representing which fields of <TT
3561 > need to be set </P
3569 NAME="AEN1044"><SPAN
3570 STYLE="white-space: nowrap"
3583 > An integer representing the result of the operation.</P
3596 NAME="GNOME-VFS-SET-FILE-INFO"
3598 >gnome_vfs_set_file_info ()</H3
3600 CLASS="PROGRAMLISTING"
3602 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
3604 > gnome_vfs_set_file_info (const gchar *text_uri,
3606 HREF="gnome-vfs-gnome-vfs-file-info.html#GNOMEVFSFILEINFO"
3607 >GnomeVFSFileInfo</A
3610 HREF="gnome-vfs-gnome-vfs-file-info.html#GNOMEVFSSETFILEINFOMASK"
3611 >GnomeVFSSetFileInfoMask</A
3614 >Set file information for <TT
3619 >; only the information for which the
3620 corresponding bit in <TT
3625 > is set is actually modified.</P
3631 CLASS="variablelist"
3641 NAME="AEN1062"><SPAN
3642 STYLE="white-space: nowrap"
3662 NAME="AEN1067"><SPAN
3663 STYLE="white-space: nowrap"
3675 > Information that must be set for the file</P
3683 NAME="AEN1072"><SPAN
3684 STYLE="white-space: nowrap"
3696 > Bit mask representing which fields of <TT
3701 > need to be set </P
3709 NAME="AEN1078"><SPAN
3710 STYLE="white-space: nowrap"
3723 > An integer representing the result of the operation.</P
3736 NAME="GNOMEVFSMETHODHANDLE"
3738 >GnomeVFSMethodHandle</H3
3740 CLASS="PROGRAMLISTING"
3741 >typedef gpointer GnomeVFSMethodHandle;</PRE
3752 NAME="GNOMEVFSOPENMODE"
3754 >enum GnomeVFSOpenMode</H3
3756 CLASS="PROGRAMLISTING"
3758 GNOME_VFS_OPEN_NONE = 0,
3759 GNOME_VFS_OPEN_READ = 1 << 0,
3760 GNOME_VFS_OPEN_WRITE = 1 << 1,
3761 GNOME_VFS_OPEN_RANDOM = 1 << 2
3762 } GnomeVFSOpenMode;</PRE
3773 NAME="GNOMEVFSSEEKPOSITION"
3775 >enum GnomeVFSSeekPosition</H3
3777 CLASS="PROGRAMLISTING"
3779 GNOME_VFS_SEEK_START,
3780 GNOME_VFS_SEEK_CURRENT,
3782 } GnomeVFSSeekPosition;</PRE
3790 SUMMARY="Navigation footer"
3799 HREF="gnome-vfs-gnome-vfs-init.html"
3801 ><<< Initialization/Shutdown</B
3808 HREF="gnome-vfs-gnome-vfs-async-ops.html"
3810 >Asynchronous File Operations >>></B