ftp://ftp.redhat.com/pub/redhat/linux/rawhide/SRPMS/SRPMS/gnome-vfs2-2.3.8-1.src.rpm
[gnome-vfs-httpcaptive.git] / libgnomevfs / gnome-vfs-ops.h
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /* gnome-vfs-ops.h - Synchronous operations for the GNOME Virtual File
3    System.
4
5    Copyright (C) 1999, 2001 Free Software Foundation
6
7    The Gnome Library is free software; you can redistribute it and/or
8    modify it under the terms of the GNU Library General Public License as
9    published by the Free Software Foundation; either version 2 of the
10    License, or (at your option) any later version.
11
12    The Gnome Library is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15    Library General Public License for more details.
16
17    You should have received a copy of the GNU Library General Public
18    License along with the Gnome Library; see the file COPYING.LIB.  If not,
19    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20    Boston, MA 02111-1307, USA.
21
22    Author: Ettore Perazzoli <ettore@comm2000.it> 
23            Seth Nickell <snickell@stanford.edu>
24 */
25
26 #ifndef GNOME_VFS_OPS_H
27 #define GNOME_VFS_OPS_H
28
29 #include <libgnomevfs/gnome-vfs-file-info.h>
30 #include <libgnomevfs/gnome-vfs-handle.h>
31 #include <libgnomevfs/gnome-vfs-uri.h>
32 #include <libgnomevfs/gnome-vfs-monitor.h>
33
34 G_BEGIN_DECLS
35
36 GnomeVFSResult   gnome_vfs_open                 (GnomeVFSHandle **handle,
37                                                  const gchar *text_uri,
38                                                  GnomeVFSOpenMode open_mode);
39
40 GnomeVFSResult   gnome_vfs_open_uri             (GnomeVFSHandle **handle,
41                                                  GnomeVFSURI *uri,
42                                                  GnomeVFSOpenMode open_mode);
43
44 GnomeVFSResult   gnome_vfs_create               (GnomeVFSHandle **handle,
45                                                  const gchar *text_uri,
46                                                  GnomeVFSOpenMode open_mode,
47                                                  gboolean exclusive,
48                                                  guint perm);
49
50 GnomeVFSResult   gnome_vfs_create_uri           (GnomeVFSHandle **handle,
51                                                  GnomeVFSURI *uri,
52                                                  GnomeVFSOpenMode open_mode,
53                                                  gboolean exclusive,
54                                                  guint perm);
55
56 GnomeVFSResult   gnome_vfs_close                (GnomeVFSHandle *handle);
57
58 GnomeVFSResult   gnome_vfs_read                 (GnomeVFSHandle *handle,
59                                                  gpointer buffer,
60                                                  GnomeVFSFileSize bytes,
61                                                  GnomeVFSFileSize *bytes_read);
62
63 GnomeVFSResult   gnome_vfs_write                (GnomeVFSHandle *handle,
64                                                  gconstpointer buffer,
65                                                  GnomeVFSFileSize bytes,
66                                                  GnomeVFSFileSize *bytes_written);
67
68 GnomeVFSResult   gnome_vfs_seek                 (GnomeVFSHandle *handle,
69                                                  GnomeVFSSeekPosition whence,
70                                                  GnomeVFSFileOffset offset);
71
72 GnomeVFSResult   gnome_vfs_tell                 (GnomeVFSHandle *handle,
73                                                  GnomeVFSFileSize *offset_return);
74
75 GnomeVFSResult   gnome_vfs_get_file_info        (const gchar *text_uri,
76                                                  GnomeVFSFileInfo *info,
77                                                  GnomeVFSFileInfoOptions options);
78
79 GnomeVFSResult   gnome_vfs_get_file_info_uri    (GnomeVFSURI *uri,
80                                                  GnomeVFSFileInfo *info,
81                                                  GnomeVFSFileInfoOptions options);
82
83 GnomeVFSResult   gnome_vfs_get_file_info_from_handle
84                                                 (GnomeVFSHandle *handle,
85                                                  GnomeVFSFileInfo *info,
86                                                  GnomeVFSFileInfoOptions options);
87
88 GnomeVFSResult   gnome_vfs_truncate             (const gchar *text_uri,
89                                                  GnomeVFSFileSize length);
90 GnomeVFSResult   gnome_vfs_truncate_uri         (GnomeVFSURI *uri,
91                                                  GnomeVFSFileSize length);
92 GnomeVFSResult   gnome_vfs_truncate_handle      (GnomeVFSHandle *handle,
93                                                  GnomeVFSFileSize length);
94
95 GnomeVFSResult   gnome_vfs_make_directory_for_uri
96                                                 (GnomeVFSURI *uri, guint perm);
97 GnomeVFSResult   gnome_vfs_make_directory       (const gchar *text_uri,
98                                                  guint perm);
99
100 GnomeVFSResult   gnome_vfs_remove_directory_from_uri
101                                                 (GnomeVFSURI *uri);
102 GnomeVFSResult   gnome_vfs_remove_directory     (const gchar *text_uri);
103
104 GnomeVFSResult   gnome_vfs_unlink_from_uri      (GnomeVFSURI *uri);
105 GnomeVFSResult   gnome_vfs_create_symbolic_link (GnomeVFSURI *uri, 
106                                                  const gchar *target_reference);
107 GnomeVFSResult   gnome_vfs_unlink               (const gchar *text_uri);
108
109 GnomeVFSResult   gnome_vfs_move_uri             (GnomeVFSURI *old_uri,
110                                                  GnomeVFSURI *new_uri,
111                                                  gboolean force_replace);
112 GnomeVFSResult   gnome_vfs_move                 (const gchar *old_text_uri,
113                                                  const gchar *new_text_uri,
114                                                  gboolean force_replace);
115
116 GnomeVFSResult   gnome_vfs_check_same_fs_uris   (GnomeVFSURI *source_uri,
117                                                  GnomeVFSURI *target_uri,
118                                                  gboolean *same_fs_return);
119 GnomeVFSResult   gnome_vfs_check_same_fs        (const gchar *source,
120                                                  const gchar *target,
121                                                  gboolean *same_fs_return);
122
123 gboolean         gnome_vfs_uri_exists           (GnomeVFSURI *uri);
124
125 GnomeVFSResult   gnome_vfs_set_file_info_uri    (GnomeVFSURI *uri,
126                                                  GnomeVFSFileInfo *info,
127                                                  GnomeVFSSetFileInfoMask mask);
128 GnomeVFSResult   gnome_vfs_set_file_info        (const gchar *text_uri,
129                                                  GnomeVFSFileInfo *info,
130                                                  GnomeVFSSetFileInfoMask mask);
131
132 GnomeVFSResult gnome_vfs_monitor_add (GnomeVFSMonitorHandle **handle,
133                                       const gchar *text_uri,
134                                       GnomeVFSMonitorType monitor_type,
135                                       GnomeVFSMonitorCallback callback,
136                                       gpointer user_data);
137
138 GnomeVFSResult gnome_vfs_monitor_cancel (GnomeVFSMonitorHandle *handle);
139
140 GnomeVFSResult gnome_vfs_file_control   (GnomeVFSHandle *handle,
141                                          const char *operation,
142                                          gpointer operation_data);
143
144 G_END_DECLS
145
146 #endif /* GNOME_VFS_OPS_H */