ftp://ftp.redhat.com/pub/redhat/linux/rawhide/SRPMS/SRPMS/gnome-vfs2-2.3.8-1.src.rpm
[gnome-vfs-httpcaptive.git] / doc / html / gnome-vfs-20-gnome-vfs-xfer.html
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>File Transfers</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.0"><meta name="generator" content="GTK-Doc V1.1 (XML mode)"><style type="text/css">
2         .synopsis, .classsynopsis {
3             background: #eeeeee;
4             border: solid 1px #aaaaaa;
5             padding: 0.5em;
6         }
7         .programlisting {
8             background: #eeeeff;
9             border: solid 1px #aaaaff;
10             padding: 0.5em;
11         }
12         .variablelist {
13             padding: 4px;
14             margin-left: 3em;
15         }
16         .navigation {
17             background: #ffeeee;
18             border: solid 1px #ffaaaa;
19             margin-top: 0.5em;
20             margin-bottom: 0.5em;
21         }
22         .navigation a {
23             color: #770000;
24         }
25         .navigation a:visited {
26             color: #550000;
27         }
28         .navigation .title {
29             font-size: 200%;
30         }
31       </style><link rel="home" href="index.html" title="GnomeVFS - Filesystem Abstraction library"><link rel="up" href="advanced-operations.html" title="Advanced Operations"><link rel="previous" href="gnome-vfs-20-gnome-vfs-cancellation.html" title="Cancellation"><link rel="next" href="data-types.html" title="Data Types"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="gnome-vfs-20-gnome-vfs-cancellation.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="advanced-operations.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">GnomeVFS - Filesystem Abstraction library</th><td><a accesskey="n" href="data-types.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="gnome-vfs-20-gnome-vfs-xfer"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2><span class="refentrytitle">File Transfers</span></h2><p>File Transfers &#8212; Conveniently copy/move/delete files en masse</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
32
33
34
35 enum        <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferOptions">GnomeVFSXferOptions</a>;
36 enum        <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferProgressStatus">GnomeVFSXferProgressStatus</a>;
37 enum        <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferOverwriteMode">GnomeVFSXferOverwriteMode</a>;
38 enum        <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferOverwriteAction">GnomeVFSXferOverwriteAction</a>;
39 enum        <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferErrorMode">GnomeVFSXferErrorMode</a>;
40 enum        <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferErrorAction">GnomeVFSXferErrorAction</a>;
41 enum        <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferPhase">GnomeVFSXferPhase</a>;
42 typedef     <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferProgressInfo">GnomeVFSXferProgressInfo</a>;
43 <a
44 href="../glib/glib-Basic-Types.html#gint"
45 >gint</a>        (<a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferProgressCallback">*GnomeVFSXferProgressCallback</a>) (<a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferProgressInfo">GnomeVFSXferProgressInfo</a> *info,
46                                              <a
47 href="../glib/glib-Basic-Types.html#gpointer"
48 >gpointer</a> data);
49 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-xfer.html#gnome-vfs-xfer-uri-list">gnome_vfs_xfer_uri_list</a>      (const <a
50 href="../glib/glib-Doubly-Linked-Lists.html#GList"
51 >GList</a> *source_uri_list,
52                                              const <a
53 href="../glib/glib-Doubly-Linked-Lists.html#GList"
54 >GList</a> *target_uri_list,
55                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferOptions">GnomeVFSXferOptions</a> xfer_options,
56                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferErrorMode">GnomeVFSXferErrorMode</a> error_mode,
57                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferOverwriteMode">GnomeVFSXferOverwriteMode</a> overwrite_mode,
58                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferProgressCallback">GnomeVFSXferProgressCallback</a> progress_callback,
59                                              <a
60 href="../glib/glib-Basic-Types.html#gpointer"
61 >gpointer</a> data);
62 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-xfer.html#gnome-vfs-xfer-uri">gnome_vfs_xfer_uri</a>           (const GnomeVFSURI *source_uri,
63                                              const GnomeVFSURI *target_uri,
64                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferOptions">GnomeVFSXferOptions</a> xfer_options,
65                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferErrorMode">GnomeVFSXferErrorMode</a> error_mode,
66                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferOverwriteMode">GnomeVFSXferOverwriteMode</a> overwrite_mode,
67                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferProgressCallback">GnomeVFSXferProgressCallback</a> progress_callback,
68                                              <a
69 href="../glib/glib-Basic-Types.html#gpointer"
70 >gpointer</a> data);
71 <a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> <a href="gnome-vfs-20-gnome-vfs-xfer.html#gnome-vfs-xfer-delete-list">gnome_vfs_xfer_delete_list</a>   (const <a
72 href="../glib/glib-Doubly-Linked-Lists.html#GList"
73 >GList</a> *source_uri_list,
74                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferErrorMode">GnomeVFSXferErrorMode</a> error_mode,
75                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferOptions">GnomeVFSXferOptions</a> xfer_options,
76                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferProgressCallback">GnomeVFSXferProgressCallback</a> progress_callback,
77                                              <a
78 href="../glib/glib-Basic-Types.html#gpointer"
79 >gpointer</a> data);
80 </pre></div><div class="refsect1" lang="en"><h2>Description</h2><p>
81
82 </p></div><div class="refsect1" lang="en"><h2>Details</h2><div class="refsect2" lang="en"><h3><a name="GnomeVFSXferOptions"></a>enum GnomeVFSXferOptions</h3><a class="indexterm" name="id2924378"></a><pre class="programlisting">typedef enum {
83         GNOME_VFS_XFER_DEFAULT = 0,
84         GNOME_VFS_XFER_UNUSED_1 = 1 &lt;&lt; 0,
85         GNOME_VFS_XFER_FOLLOW_LINKS = 1 &lt;&lt; 1,
86         GNOME_VFS_XFER_UNUSED_2 = 1 &lt;&lt; 2,
87         GNOME_VFS_XFER_RECURSIVE = 1 &lt;&lt; 3,
88         GNOME_VFS_XFER_SAMEFS = 1 &lt;&lt; 4,
89         GNOME_VFS_XFER_DELETE_ITEMS = 1 &lt;&lt; 5,
90         GNOME_VFS_XFER_EMPTY_DIRECTORIES = 1 &lt;&lt; 6,
91         GNOME_VFS_XFER_NEW_UNIQUE_DIRECTORY = 1 &lt;&lt; 7,
92         GNOME_VFS_XFER_REMOVESOURCE = 1 &lt;&lt; 8,
93         GNOME_VFS_XFER_USE_UNIQUE_NAMES = 1 &lt;&lt; 9,
94         GNOME_VFS_XFER_LINK_ITEMS = 1 &lt;&lt; 10,
95         GNOME_VFS_XFER_FOLLOW_LINKS_RECURSIVE = 1 &lt;&lt; 11
96 } GnomeVFSXferOptions;
97 </pre><p>
98
99 </p></div><hr><div class="refsect2" lang="en"><h3><a name="GnomeVFSXferProgressStatus"></a>enum GnomeVFSXferProgressStatus</h3><a class="indexterm" name="id2924426"></a><pre class="programlisting">typedef enum {
100         GNOME_VFS_XFER_PROGRESS_STATUS_OK = 0,
101         GNOME_VFS_XFER_PROGRESS_STATUS_VFSERROR = 1,
102         GNOME_VFS_XFER_PROGRESS_STATUS_OVERWRITE = 2,
103         /* during the duplicate status the progress callback is asked to
104            supply a new unique name */
105         GNOME_VFS_XFER_PROGRESS_STATUS_DUPLICATE = 3
106 } GnomeVFSXferProgressStatus;
107 </pre><p>
108
109 </p></div><hr><div class="refsect2" lang="en"><h3><a name="GnomeVFSXferOverwriteMode"></a>enum GnomeVFSXferOverwriteMode</h3><a class="indexterm" name="id2924464"></a><pre class="programlisting">typedef enum {
110         /* Interrupt transferring with an error (GNOME_VFS_ERROR_FILEEXISTS).  */
111         GNOME_VFS_XFER_OVERWRITE_MODE_ABORT = 0,
112         /* Invoke the progress callback with a
113            `GNOME_VFS_XFER_PROGRESS_STATUS_OVERWRITE' status code. */
114         GNOME_VFS_XFER_OVERWRITE_MODE_QUERY = 1,
115         /* Overwrite files silently.  */
116         GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE = 2,
117         /* Ignore files silently.  */
118         GNOME_VFS_XFER_OVERWRITE_MODE_SKIP = 3
119 } GnomeVFSXferOverwriteMode;
120 </pre><p>
121
122 </p></div><hr><div class="refsect2" lang="en"><h3><a name="GnomeVFSXferOverwriteAction"></a>enum GnomeVFSXferOverwriteAction</h3><a class="indexterm" name="id2924505"></a><pre class="programlisting">typedef enum {
123         GNOME_VFS_XFER_OVERWRITE_ACTION_ABORT = 0,
124         GNOME_VFS_XFER_OVERWRITE_ACTION_REPLACE = 1,
125         GNOME_VFS_XFER_OVERWRITE_ACTION_REPLACE_ALL = 2,
126         GNOME_VFS_XFER_OVERWRITE_ACTION_SKIP = 3,
127         GNOME_VFS_XFER_OVERWRITE_ACTION_SKIP_ALL = 4
128 } GnomeVFSXferOverwriteAction;
129 </pre><p>
130 This defines the actions to perform before a file is being overwritten
131 (i.e., these are the answers that can be given to a replace query).</p><p>
132
133 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><tt class="literal">GNOME_VFS_XFER_OVERWRITE_ACTION_ABORT</tt></span></td><td> abort the transfer
134 </td></tr><tr><td><span class="term"><tt class="literal">GNOME_VFS_XFER_OVERWRITE_ACTION_REPLACE</tt></span></td><td> replace the existing file
135 </td></tr><tr><td><span class="term"><tt class="literal">GNOME_VFS_XFER_OVERWRITE_ACTION_REPLACE_ALL</tt></span></td><td> replace the existing file, and all future files
136 without prompting the callback.
137 </td></tr><tr><td><span class="term"><tt class="literal">GNOME_VFS_XFER_OVERWRITE_ACTION_SKIP</tt></span></td><td> don't copy over the existing file
138 </td></tr><tr><td><span class="term"><tt class="literal">GNOME_VFS_XFER_OVERWRITE_ACTION_SKIP_ALL</tt></span></td><td> don't copy over the existing file, and all future
139 files without prompting the callback.
140 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="GnomeVFSXferErrorMode"></a>enum GnomeVFSXferErrorMode</h3><a class="indexterm" name="id2924651"></a><pre class="programlisting">typedef enum {
141         /* Interrupt transferring with an error (code returned is code of the
142            operation that has caused the error).  */
143         GNOME_VFS_XFER_ERROR_MODE_ABORT = 0,
144         /* Invoke the progress callback with a
145            `GNOME_VFS_XFER_PROGRESS_STATUS_VFSERROR' status code. */
146         GNOME_VFS_XFER_ERROR_MODE_QUERY = 1
147 } GnomeVFSXferErrorMode;
148 </pre><p>
149
150 </p></div><hr><div class="refsect2" lang="en"><h3><a name="GnomeVFSXferErrorAction"></a>enum GnomeVFSXferErrorAction</h3><a class="indexterm" name="id2924690"></a><pre class="programlisting">typedef enum {
151         /* Interrupt operation and return `GNOME_VFS_ERROR_INTERRUPTED'.  */
152         GNOME_VFS_XFER_ERROR_ACTION_ABORT = 0,
153         /* Try the same operation again.  */
154         GNOME_VFS_XFER_ERROR_ACTION_RETRY = 1,
155         /* Skip this file and continue normally.  */
156         GNOME_VFS_XFER_ERROR_ACTION_SKIP = 2
157 } GnomeVFSXferErrorAction;
158 </pre><p>
159
160 </p></div><hr><div class="refsect2" lang="en"><h3><a name="GnomeVFSXferPhase"></a>enum GnomeVFSXferPhase</h3><a class="indexterm" name="id2924727"></a><pre class="programlisting">typedef enum {
161         /* Initial phase */
162         GNOME_VFS_XFER_PHASE_INITIAL,
163         /* Checking if destination can handle move/copy */
164         GNOME_VFS_XFER_CHECKING_DESTINATION,
165         /* Collecting file list */
166         GNOME_VFS_XFER_PHASE_COLLECTING,
167         /* File list collected (*) */
168         GNOME_VFS_XFER_PHASE_READYTOGO,
169         /* Opening source file for reading */
170         GNOME_VFS_XFER_PHASE_OPENSOURCE,
171         /* Creating target file for copy */
172         GNOME_VFS_XFER_PHASE_OPENTARGET,
173         /* Copying data from source to target (*) */
174         GNOME_VFS_XFER_PHASE_COPYING,
175         /* Moving file from source to target (*) */
176         GNOME_VFS_XFER_PHASE_MOVING,
177         /* Reading data from source file */
178         GNOME_VFS_XFER_PHASE_READSOURCE,
179         /* Writing data to target file */
180         GNOME_VFS_XFER_PHASE_WRITETARGET,
181         /* Closing source file */
182         GNOME_VFS_XFER_PHASE_CLOSESOURCE,
183         /* Closing target file */
184         GNOME_VFS_XFER_PHASE_CLOSETARGET,
185         /* Deleting source file */
186         GNOME_VFS_XFER_PHASE_DELETESOURCE,
187         /* Setting attributes on target file */
188         GNOME_VFS_XFER_PHASE_SETATTRIBUTES,
189         /* Go to the next file (*) */
190         GNOME_VFS_XFER_PHASE_FILECOMPLETED,
191         /* cleaning up after a move (removing source files, etc.) */
192         GNOME_VFS_XFER_PHASE_CLEANUP,
193         /* Operation finished (*) */
194         GNOME_VFS_XFER_PHASE_COMPLETED,
195         GNOME_VFS_XFER_NUM_PHASES
196 } GnomeVFSXferPhase;
197 </pre><p>
198
199 </p></div><hr><div class="refsect2" lang="en"><h3><a name="GnomeVFSXferProgressInfo"></a>GnomeVFSXferProgressInfo</h3><a class="indexterm" name="id2924782"></a><pre class="programlisting">typedef struct {
200         /* Progress status (see above for a description).  */
201         GnomeVFSXferProgressStatus status;
202
203         /* VFS status code.  If `status' is
204            `GNOME_VFS_XFER_PROGRESS_STATUS_VFSERROR', you should look at this
205            member to know what has happened.  */
206         GnomeVFSResult vfs_status;
207
208         /* Current phase in the transferring process.  */
209         GnomeVFSXferPhase phase;
210
211         /* Source URI. FIXME bugzilla.eazel.com 1206: change name? */
212         gchar *source_name;
213
214         /* Destination URI. FIXME bugzilla.eazel.com 1206: change name? */
215         gchar *target_name;
216
217         /* Index of file being copied. */
218         gulong file_index;
219
220         /* Total number of files to be copied.  */
221         gulong files_total;
222
223         /* Total number of bytes to be copied.  */
224         GnomeVFSFileSize bytes_total;
225
226         /* Total size of this file (in bytes).  */
227         GnomeVFSFileSize file_size;
228
229         /* Bytes copied for this file so far.  */
230         GnomeVFSFileSize bytes_copied;
231
232         /* Total amount of data copied from the beginning.  */
233         GnomeVFSFileSize total_bytes_copied;
234         
235         /* Target unique name used when duplicating, etc. to avoid collisions */ 
236         gchar *duplicate_name;
237
238         /* Count used in the unique name e.g. (copy 2), etc. */
239         int duplicate_count;
240
241         gboolean top_level_item;
242         /* indicates that the copied/moved/deleted item is an actual item
243          * passed in the uri list rather than one encountered by recursively
244          * traversing directories. Used by metadata copying.
245          */
246
247         /* Reserved for future expansions to GnomeVFSXferProgressInfo
248          * without having to break ABI compatibility */
249         void *reserved1;
250         void *reserved2;
251
252 } GnomeVFSXferProgressInfo;
253 </pre><p>
254
255 </p></div><hr><div class="refsect2" lang="en"><h3><a name="GnomeVFSXferProgressCallback"></a>GnomeVFSXferProgressCallback ()</h3><a class="indexterm" name="id2924875"></a><pre class="programlisting"><a
256 href="../glib/glib-Basic-Types.html#gint"
257 >gint</a>        (*GnomeVFSXferProgressCallback) (<a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferProgressInfo">GnomeVFSXferProgressInfo</a> *info,
258                                              <a
259 href="../glib/glib-Basic-Types.html#gpointer"
260 >gpointer</a> data);</pre><p>
261
262 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>info</tt></i> :</span></td><td>
263 </td></tr><tr><td><span class="term"><i class="parameter"><tt>data</tt></i> :</span></td><td>
264 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>
265
266
267 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-xfer-uri-list"></a>gnome_vfs_xfer_uri_list ()</h3><a class="indexterm" name="id2924984"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_xfer_uri_list      (const <a
268 href="../glib/glib-Doubly-Linked-Lists.html#GList"
269 >GList</a> *source_uri_list,
270                                              const <a
271 href="../glib/glib-Doubly-Linked-Lists.html#GList"
272 >GList</a> *target_uri_list,
273                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferOptions">GnomeVFSXferOptions</a> xfer_options,
274                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferErrorMode">GnomeVFSXferErrorMode</a> error_mode,
275                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferOverwriteMode">GnomeVFSXferOverwriteMode</a> overwrite_mode,
276                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferProgressCallback">GnomeVFSXferProgressCallback</a> progress_callback,
277                                              <a
278 href="../glib/glib-Basic-Types.html#gpointer"
279 >gpointer</a> data);</pre><p>
280 This function will transfer multiple files to a multiple targets.  Given a
281 a source uri(s) and a destination uri(s).   There are a list of options that
282 your application can use to control how the transfer is done.</p><p>
283
284 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>source_uri_list</tt></i> :</span></td><td> A Glist of uris  (ie file;//)
285 </td></tr><tr><td><span class="term"><i class="parameter"><tt>target_uri_list</tt></i> :</span></td><td> A GList of uris  
286 </td></tr><tr><td><span class="term"><i class="parameter"><tt>xfer_options</tt></i> :</span></td><td> These are options you wish to set for the transfer. For
287 instance by setting the xfer behavior you can either make a copy or a 
288 move.  
289 </td></tr><tr><td><span class="term"><i class="parameter"><tt>error_mode</tt></i> :</span></td><td>  Decide how to behave if the xfer is interrupted.  For instance
290 you could set your application to return an error code in case of an
291 interuption.
292 </td></tr><tr><td><span class="term"><i class="parameter"><tt>overwrite_mode</tt></i> :</span></td><td> How to react if a file your copying is being overwritten.
293 </td></tr><tr><td><span class="term"><i class="parameter"><tt>progress_callback</tt></i> :</span></td><td>  This is used to monitor the progress of a transfer.
294 Common use would be to check to see if the transfer is asking for permission
295 to overwrite a file.
296 </td></tr><tr><td><span class="term"><i class="parameter"><tt>data</tt></i> :</span></td><td> Data to be want passed back in callbacks from the xfer engine
297 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> If all goes well it returns GNOME_VFS_OK.  Check GnomeVFSResult for
298 other values.
299 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-xfer-uri"></a>gnome_vfs_xfer_uri ()</h3><a class="indexterm" name="id2925243"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_xfer_uri           (const GnomeVFSURI *source_uri,
300                                              const GnomeVFSURI *target_uri,
301                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferOptions">GnomeVFSXferOptions</a> xfer_options,
302                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferErrorMode">GnomeVFSXferErrorMode</a> error_mode,
303                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferOverwriteMode">GnomeVFSXferOverwriteMode</a> overwrite_mode,
304                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferProgressCallback">GnomeVFSXferProgressCallback</a> progress_callback,
305                                              <a
306 href="../glib/glib-Basic-Types.html#gpointer"
307 >gpointer</a> data);</pre><p>
308 This function will allow a person to copy data from one location to another.
309 The location is specified using a URIs as the means to describe the location
310 of the data.  Like any copy there are several options that can be set.
311 These can be set using the xfer_options.    In addition there are callback
312 mechanisms and error codes to provide feedback in the copy
313 process.</p><p>
314
315 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>source_uri</tt></i> :</span></td><td> This is the location of where your data resides.  
316 </td></tr><tr><td><span class="term"><i class="parameter"><tt>target_uri</tt></i> :</span></td><td> This is the location of where you want your data to go.
317 </td></tr><tr><td><span class="term"><i class="parameter"><tt>xfer_options</tt></i> :</span></td><td> Set the kind of transfers you want.  These are:
318 GNOME_VFS_XFER_DEFAULT:  Default behavior.  Which is to do a straight one to
319 one copy.
320 GNOME_VFS_XFER_FOLLOW_LINKS:  This means follow the value of the symbolic
321 link when copying.  (ie treat a symbolic link as a directory)
322 GNOME_VFS_RECURSIVE:  Do a recursive copy of the source to the destination.
323 Equivalent to the cp -r option in GNU cp.
324 GNOME_VFS_XFER_SAME_FS:  This only allows copying onto the same filesystem.
325 GNOME_VFS_DELETE_ITEM: This is equivalent to a mv.  Where you will copy the
326 contents of the source to the destination and then remove data from the
327 source URI.
328 GNOME_VFS_XFER_EMPTY_DIRECTORIES: &lt;TBA&gt;
329 GNOME_VFS_XFER_NEW_UNIQUE_DIRECTORY:  This will create a directory if it
330 doesn't exist in the destination area.  Useful with the
331 GNOME_VFS_XFER_RECURSIVE xfer option.
332 GNOME_VFS_XFER_REMOVESOURCE: This option will remove the source data after
333 whatever xfer option has been taken.
334 GNOME_VFS_USE_UNIQUE_NAMES:  This is a check ot make sure that what you copy
335 onto the destination is not overwritten.  It will only copy the unique items
336 from the source to the destjnation.
337 GNOME_VFS_XFER_LINK_ITEMS: &lt;TBA&gt;
338 </td></tr><tr><td><span class="term"><i class="parameter"><tt>error_mode</tt></i> :</span></td><td>  When this function returns you need to check the error code
339 for the results of the copy.  The results are generally:
340 GNOME_VFS_XFER_ERROR_MODE_ABORT: This means that the operation was aborted
341 by some sort of signal that interrupted the transfer.
342 GNOME_VFS_ERROR_MODE_QUERY: This means that no error has occured and that
343 you should query with the GNOME_VFS_XFER_PROGRESS_STATUS_VFSERROR.  See
344 </td></tr><tr><td><span class="term"><i class="parameter"><tt>overwrite_mode</tt></i> :</span></td><td>  This sets the options to deal with data that are duplicate
345 between the source and the destination.  Your choices are:
346 GNOME_VFS_XFER_OVERWRITE_MODE_ABORT:  This means abort the transfer if you
347 see duplicate data.
348 GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE: Replace the files silently.  Don't
349 worry be happy.
350 GNOME_VFS_XFER_OVERWRITE_MODE_SKIP: Skip duplicate files silenty.
351 target.
352 </td></tr><tr><td><span class="term"><i class="parameter"><tt>progress_callback</tt></i> :</span></td><td>  This is an important call back because this is how you
353 communicate with your copy process.  
354 </td></tr><tr><td><span class="term"><i class="parameter"><tt>data</tt></i> :</span></td><td> Data to be want passed back in callbacks from the xfer engine
355 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> An integer representing the result of the operation.
356
357 </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><h3><a name="gnome-vfs-xfer-delete-list"></a>gnome_vfs_xfer_delete_list ()</h3><a class="indexterm" name="id2925546"></a><pre class="programlisting"><a href="gnome-vfs-20-gnome-vfs-result.html#GnomeVFSResult">GnomeVFSResult</a> gnome_vfs_xfer_delete_list   (const <a
358 href="../glib/glib-Doubly-Linked-Lists.html#GList"
359 >GList</a> *source_uri_list,
360                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferErrorMode">GnomeVFSXferErrorMode</a> error_mode,
361                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferOptions">GnomeVFSXferOptions</a> xfer_options,
362                                              <a href="gnome-vfs-20-gnome-vfs-xfer.html#GnomeVFSXferProgressCallback">GnomeVFSXferProgressCallback</a> progress_callback,
363                                              <a
364 href="../glib/glib-Basic-Types.html#gpointer"
365 >gpointer</a> data);</pre><p>
366 Unlink items in the list <i class="parameter"><tt>source_uri_list</tt></i> from their filesystems.</p><p>
367
368 </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>source_uri_list</tt></i> :</span></td><td>  This is a list containing uris
369 </td></tr><tr><td><span class="term"><i class="parameter"><tt>error_mode</tt></i> :</span></td><td>  Decide how you want to deal with interruptions
370 </td></tr><tr><td><span class="term"><i class="parameter"><tt>xfer_options</tt></i> :</span></td><td> Set whatever transfer options you need.
371 </td></tr><tr><td><span class="term"><i class="parameter"><tt>progress_callback</tt></i> :</span></td><td> Callback to check on progress of transfer.
372 </td></tr><tr><td><span class="term"><i class="parameter"><tt>data</tt></i> :</span></td><td> Data to be want passed back in callbacks from the xfer engine
373 </td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <tt class="literal">GNOME_VFS_OK</tt> if successful, or the appropriate error code otherwise
374 </td></tr></tbody></table></div></div></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="gnome-vfs-20-gnome-vfs-cancellation.html"><b>&lt;&lt; Cancellation</b></a></td><td align="right"><a accesskey="n" href="data-types.html"><b>Data Types &gt;&gt;</b></a></td></tr></table></body></html>