1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /* gnome-vfs-directory.h - Directory handling for the GNOME Virtual
5 Copyright (C) 1999 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> */
24 #ifndef GNOME_VFS_DIRECTORY_H
25 #define GNOME_VFS_DIRECTORY_H
27 #include <glib/gmacros.h>
28 #include <libgnomevfs/gnome-vfs-file-info.h>
32 typedef struct GnomeVFSDirectoryHandle GnomeVFSDirectoryHandle;
35 * GnomeVFSDirectoryVisitOptions:
36 * @GNOME_VFS_DIRECTORY_VISIT_DEFAULT:
37 * @GNOME_VFS_DIRECTORY_VISIT_SAMEFS: Visit only directories on the same
38 * file system as the parent
39 * @GNOME_VFS_DIRECTORY_VISIT_LOOPCHECK: Loop prevention
41 * This options control the way in which directories are visited.
45 GNOME_VFS_DIRECTORY_VISIT_DEFAULT = 0,
46 GNOME_VFS_DIRECTORY_VISIT_SAMEFS = 1 << 0,
47 GNOME_VFS_DIRECTORY_VISIT_LOOPCHECK = 1 << 1
48 } GnomeVFSDirectoryVisitOptions;
50 typedef gboolean (* GnomeVFSDirectoryVisitFunc) (const gchar *rel_path,
51 GnomeVFSFileInfo *info,
52 gboolean recursing_will_loop,
56 GnomeVFSResult gnome_vfs_directory_open
57 (GnomeVFSDirectoryHandle **handle,
58 const gchar *text_uri,
59 GnomeVFSFileInfoOptions options);
60 GnomeVFSResult gnome_vfs_directory_open_from_uri
61 (GnomeVFSDirectoryHandle **handle,
63 GnomeVFSFileInfoOptions options);
64 GnomeVFSResult gnome_vfs_directory_read_next
65 (GnomeVFSDirectoryHandle *handle,
66 GnomeVFSFileInfo *file_info);
67 GnomeVFSResult gnome_vfs_directory_close
68 (GnomeVFSDirectoryHandle *handle);
71 GnomeVFSResult gnome_vfs_directory_visit
73 GnomeVFSFileInfoOptions info_options,
74 GnomeVFSDirectoryVisitOptions visit_options,
75 GnomeVFSDirectoryVisitFunc callback,
78 GnomeVFSResult gnome_vfs_directory_visit_uri
80 GnomeVFSFileInfoOptions info_options,
81 GnomeVFSDirectoryVisitOptions visit_options,
82 GnomeVFSDirectoryVisitFunc callback,
85 GnomeVFSResult gnome_vfs_directory_visit_files
86 (const gchar *text_uri,
88 GnomeVFSFileInfoOptions info_options,
89 GnomeVFSDirectoryVisitOptions visit_options,
90 GnomeVFSDirectoryVisitFunc callback,
93 GnomeVFSResult gnome_vfs_directory_visit_files_at_uri
96 GnomeVFSFileInfoOptions info_options,
97 GnomeVFSDirectoryVisitOptions visit_options,
98 GnomeVFSDirectoryVisitFunc callback,
101 GnomeVFSResult gnome_vfs_directory_list_load
103 const gchar *text_uri,
104 GnomeVFSFileInfoOptions options);