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
5 Copyright (C) 1999, 2001 Free Software Foundation
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.
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.
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.
22 Author: Ettore Perazzoli <ettore@comm2000.it>
23 Seth Nickell <snickell@stanford.edu>
26 #ifndef GNOME_VFS_OPS_H
27 #define GNOME_VFS_OPS_H
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>
36 GnomeVFSResult gnome_vfs_open (GnomeVFSHandle **handle,
37 const gchar *text_uri,
38 GnomeVFSOpenMode open_mode);
40 GnomeVFSResult gnome_vfs_open_uri (GnomeVFSHandle **handle,
42 GnomeVFSOpenMode open_mode);
44 GnomeVFSResult gnome_vfs_create (GnomeVFSHandle **handle,
45 const gchar *text_uri,
46 GnomeVFSOpenMode open_mode,
50 GnomeVFSResult gnome_vfs_create_uri (GnomeVFSHandle **handle,
52 GnomeVFSOpenMode open_mode,
56 GnomeVFSResult gnome_vfs_close (GnomeVFSHandle *handle);
58 GnomeVFSResult gnome_vfs_read (GnomeVFSHandle *handle,
60 GnomeVFSFileSize bytes,
61 GnomeVFSFileSize *bytes_read);
63 GnomeVFSResult gnome_vfs_write (GnomeVFSHandle *handle,
65 GnomeVFSFileSize bytes,
66 GnomeVFSFileSize *bytes_written);
68 GnomeVFSResult gnome_vfs_seek (GnomeVFSHandle *handle,
69 GnomeVFSSeekPosition whence,
70 GnomeVFSFileOffset offset);
72 GnomeVFSResult gnome_vfs_tell (GnomeVFSHandle *handle,
73 GnomeVFSFileSize *offset_return);
75 GnomeVFSResult gnome_vfs_get_file_info (const gchar *text_uri,
76 GnomeVFSFileInfo *info,
77 GnomeVFSFileInfoOptions options);
79 GnomeVFSResult gnome_vfs_get_file_info_uri (GnomeVFSURI *uri,
80 GnomeVFSFileInfo *info,
81 GnomeVFSFileInfoOptions options);
83 GnomeVFSResult gnome_vfs_get_file_info_from_handle
84 (GnomeVFSHandle *handle,
85 GnomeVFSFileInfo *info,
86 GnomeVFSFileInfoOptions options);
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);
95 GnomeVFSResult gnome_vfs_make_directory_for_uri
96 (GnomeVFSURI *uri, guint perm);
97 GnomeVFSResult gnome_vfs_make_directory (const gchar *text_uri,
100 GnomeVFSResult gnome_vfs_remove_directory_from_uri
102 GnomeVFSResult gnome_vfs_remove_directory (const gchar *text_uri);
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);
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);
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,
121 gboolean *same_fs_return);
123 gboolean gnome_vfs_uri_exists (GnomeVFSURI *uri);
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);
132 GnomeVFSResult gnome_vfs_monitor_add (GnomeVFSMonitorHandle **handle,
133 const gchar *text_uri,
134 GnomeVFSMonitorType monitor_type,
135 GnomeVFSMonitorCallback callback,
138 GnomeVFSResult gnome_vfs_monitor_cancel (GnomeVFSMonitorHandle *handle);
140 GnomeVFSResult gnome_vfs_file_control (GnomeVFSHandle *handle,
141 const char *operation,
142 gpointer operation_data);
146 #endif /* GNOME_VFS_OPS_H */