4 >Locating Standard Directories</TITLE
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
10 TITLE="GnomeVFS - Filesystem Abstraction library"
11 HREF="index.html"><LINK
14 HREF="directory-operations.html"><LINK
16 TITLE="Directory Operations"
17 HREF="gnome-vfs-gnome-vfs-directory.html"><LINK
19 TITLE="Advanced Operations"
20 HREF="advanced-operations.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-directory.html"
83 HREF="directory-operations.html"
105 >GnomeVFS - Filesystem Abstraction library</TH
109 HREF="advanced-operations.html"
121 NAME="GNOME-VFS-GNOME-VFS-FIND-DIRECTORY"
123 >Locating Standard Directories</H1
131 >Locating Standard Directories -- utilities for locating standard directories such as the desktop and trash</DIV
133 CLASS="REFSYNOPSISDIV"
144 HREF="gnome-vfs-gnome-vfs-find-directory.html#GNOMEVFSFINDDIRECTORYKIND"
145 >GnomeVFSFindDirectoryKind</A
148 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
151 HREF="gnome-vfs-gnome-vfs-find-directory.html#GNOME-VFS-FIND-DIRECTORY"
152 >gnome_vfs_find_directory</A
153 > (GnomeVFSURI *near_uri,
155 HREF="gnome-vfs-gnome-vfs-find-directory.html#GNOMEVFSFINDDIRECTORYKIND"
156 >GnomeVFSFindDirectoryKind</A
158 GnomeVFSURI **result,
159 gboolean create_if_needed,
160 gboolean find_if_needed,
161 guint permissions);</PRE
187 NAME="GNOMEVFSFINDDIRECTORYKIND"
189 >enum GnomeVFSFindDirectoryKind</H3
191 CLASS="PROGRAMLISTING"
193 GNOME_VFS_DIRECTORY_KIND_DESKTOP = 1000,
194 GNOME_VFS_DIRECTORY_KIND_TRASH = 1001
195 } GnomeVFSFindDirectoryKind;</PRE
206 NAME="GNOME-VFS-FIND-DIRECTORY"
208 >gnome_vfs_find_directory ()</H3
210 CLASS="PROGRAMLISTING"
212 HREF="gnome-vfs-gnome-vfs-result.html#GNOMEVFSRESULT"
214 > gnome_vfs_find_directory (GnomeVFSURI *near_uri,
216 HREF="gnome-vfs-gnome-vfs-find-directory.html#GNOMEVFSFINDDIRECTORYKIND"
217 >GnomeVFSFindDirectoryKind</A
219 GnomeVFSURI **result,
220 gboolean create_if_needed,
221 gboolean find_if_needed,
222 guint permissions);</PRE
224 >Used to return well known directories such as Trash, Desktop, etc. from different
227 >There is quite a complicated logic behind finding/creating a Trash directory
228 and you need to be aware of some implications:
229 Finding the Trash the first time when using the file method may be pretty
230 expensive. A cache file is used to store the location of that Trash file
237 > is specified without <TT
243 creating a Trash file when there already is one. Your app should start out
244 by doing a gnome_vfs_find_directory with the <TT
255 > flag to create Trash lazily when it is
256 needed for throwing away an item on a given disk.</P
273 STYLE="white-space: nowrap"
285 > find a well known directory on the same volume as <TT
299 STYLE="white-space: nowrap"
311 > kind of well known directory</P
320 STYLE="white-space: nowrap"
332 > newly created URI of the directory we found</P
341 STYLE="white-space: nowrap"
353 > If directory we are looking for does not exist, try to create it</P
362 STYLE="white-space: nowrap"
374 > If we don't know where trash is yet, look for it.</P
383 STYLE="white-space: nowrap"
395 > If creating, use these permissions</P
404 STYLE="white-space: nowrap"
417 > An integer representing the result of the operation</P
427 SUMMARY="Navigation footer"
436 HREF="gnome-vfs-gnome-vfs-directory.html"
438 ><<< Directory Operations</B
445 HREF="advanced-operations.html"
447 >Advanced Operations >>></B