<refentry id="gnome-vfs-20-gnome-vfs-uri">
<refmeta>
<refentrytitle id="top_of_page">GnomeVFSURI</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GNOME-VFS-2.0 Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GnomeVFSURI</refname>
<refpurpose>
Functions for manipulating URIs</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

<refsynopsisdiv id="synopsis">
<title id="synopsis.title">Synopsis</title>

<synopsis>



            <link linkend="GnomeVFSURI">GnomeVFSURI</link>;
            <link linkend="GnomeVFSToplevelURI">GnomeVFSToplevelURI</link>;
enum        <link linkend="GnomeVFSURIHideOptions">GnomeVFSURIHideOptions</link>;
#define     <link linkend="GNOME-VFS-URI-MAGIC-CHR:CAPS">GNOME_VFS_URI_MAGIC_CHR</link>
#define     <link linkend="GNOME-VFS-URI-MAGIC-STR:CAPS">GNOME_VFS_URI_MAGIC_STR</link>
#define     <link linkend="GNOME-VFS-URI-PATH-CHR:CAPS">GNOME_VFS_URI_PATH_CHR</link>
#define     <link linkend="GNOME-VFS-URI-PATH-STR:CAPS">GNOME_VFS_URI_PATH_STR</link>
<link linkend="GnomeVFSURI">GnomeVFSURI</link>* <link linkend="gnome-vfs-uri-new">gnome_vfs_uri_new</link>              (const <link linkend="gchar">gchar</link> *text_uri);
<link linkend="GnomeVFSURI">GnomeVFSURI</link>* <link linkend="gnome-vfs-uri-resolve-relative">gnome_vfs_uri_resolve_relative</link> (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *base,
                                             const <link linkend="gchar">gchar</link> *relative_reference);
<link linkend="GnomeVFSURI">GnomeVFSURI</link>* <link linkend="gnome-vfs-uri-ref">gnome_vfs_uri_ref</link>              (<link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);
<link linkend="void">void</link>        <link linkend="gnome-vfs-uri-unref">gnome_vfs_uri_unref</link>             (<link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);
<link linkend="GnomeVFSURI">GnomeVFSURI</link>* <link linkend="gnome-vfs-uri-append-string">gnome_vfs_uri_append_string</link>    (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri,
                                             const <link linkend="char">char</link> *uri_fragment);
<link linkend="GnomeVFSURI">GnomeVFSURI</link>* <link linkend="gnome-vfs-uri-append-path">gnome_vfs_uri_append_path</link>      (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri,
                                             const <link linkend="char">char</link> *path);
<link linkend="GnomeVFSURI">GnomeVFSURI</link>* <link linkend="gnome-vfs-uri-append-file-name">gnome_vfs_uri_append_file_name</link> (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri,
                                             const <link linkend="gchar">gchar</link> *filename);
<link linkend="gchar">gchar</link>*      <link linkend="gnome-vfs-uri-to-string">gnome_vfs_uri_to_string</link>         (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri,
                                             <link linkend="GnomeVFSURIHideOptions">GnomeVFSURIHideOptions</link> hide_options);
<link linkend="GnomeVFSURI">GnomeVFSURI</link>* <link linkend="gnome-vfs-uri-dup">gnome_vfs_uri_dup</link>              (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);
<link linkend="gboolean">gboolean</link>    <link linkend="gnome-vfs-uri-is-local">gnome_vfs_uri_is_local</link>          (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);
<link linkend="gboolean">gboolean</link>    <link linkend="gnome-vfs-uri-has-parent">gnome_vfs_uri_has_parent</link>        (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);
<link linkend="GnomeVFSURI">GnomeVFSURI</link>* <link linkend="gnome-vfs-uri-get-parent">gnome_vfs_uri_get_parent</link>       (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);
<link linkend="GnomeVFSToplevelURI">GnomeVFSToplevelURI</link>* <link linkend="gnome-vfs-uri-get-toplevel">gnome_vfs_uri_get_toplevel</link>
                                            (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);
const <link linkend="gchar">gchar</link>* <link linkend="gnome-vfs-uri-get-host-name">gnome_vfs_uri_get_host_name</link>    (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);
const <link linkend="gchar">gchar</link>* <link linkend="gnome-vfs-uri-get-scheme">gnome_vfs_uri_get_scheme</link>       (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);
<link linkend="guint">guint</link>       <link linkend="gnome-vfs-uri-get-host-port">gnome_vfs_uri_get_host_port</link>     (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);
const <link linkend="gchar">gchar</link>* <link linkend="gnome-vfs-uri-get-user-name">gnome_vfs_uri_get_user_name</link>    (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);
const <link linkend="gchar">gchar</link>* <link linkend="gnome-vfs-uri-get-password">gnome_vfs_uri_get_password</link>     (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);
<link linkend="void">void</link>        <link linkend="gnome-vfs-uri-set-host-name">gnome_vfs_uri_set_host_name</link>     (<link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri,
                                             const <link linkend="gchar">gchar</link> *host_name);
<link linkend="void">void</link>        <link linkend="gnome-vfs-uri-set-host-port">gnome_vfs_uri_set_host_port</link>     (<link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri,
                                             <link linkend="guint">guint</link> host_port);
<link linkend="void">void</link>        <link linkend="gnome-vfs-uri-set-user-name">gnome_vfs_uri_set_user_name</link>     (<link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri,
                                             const <link linkend="gchar">gchar</link> *user_name);
<link linkend="void">void</link>        <link linkend="gnome-vfs-uri-set-password">gnome_vfs_uri_set_password</link>      (<link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri,
                                             const <link linkend="gchar">gchar</link> *password);
<link linkend="gboolean">gboolean</link>    <link linkend="gnome-vfs-uri-equal">gnome_vfs_uri_equal</link>             (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *a,
                                             const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *b);
<link linkend="gboolean">gboolean</link>    <link linkend="gnome-vfs-uri-is-parent">gnome_vfs_uri_is_parent</link>         (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *possible_parent,
                                             const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *possible_child,
                                             <link linkend="gboolean">gboolean</link> recursive);
const <link linkend="gchar">gchar</link>* <link linkend="gnome-vfs-uri-get-path">gnome_vfs_uri_get_path</link>         (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);
const <link linkend="gchar">gchar</link>* <link linkend="gnome-vfs-uri-get-fragment-identifier">gnome_vfs_uri_get_fragment_identifier</link>
                                            (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);
<link linkend="gchar">gchar</link>*      <link linkend="gnome-vfs-uri-extract-dirname">gnome_vfs_uri_extract_dirname</link>   (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);
<link linkend="gchar">gchar</link>*      <link linkend="gnome-vfs-uri-extract-short-name">gnome_vfs_uri_extract_short_name</link>
                                            (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);
<link linkend="gchar">gchar</link>*      <link linkend="gnome-vfs-uri-extract-short-path-name">gnome_vfs_uri_extract_short_path_name</link>
                                            (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);
<link linkend="gint">gint</link>        <link linkend="gnome-vfs-uri-hequal">gnome_vfs_uri_hequal</link>            (<link linkend="gconstpointer">gconstpointer</link> a,
                                             <link linkend="gconstpointer">gconstpointer</link> b);
<link linkend="guint">guint</link>       <link linkend="gnome-vfs-uri-hash">gnome_vfs_uri_hash</link>              (<link linkend="gconstpointer">gconstpointer</link> p);
<link linkend="GList">GList</link>*      <link linkend="gnome-vfs-uri-list-parse">gnome_vfs_uri_list_parse</link>        (const <link linkend="gchar">gchar</link> *uri_list);
<link linkend="GList">GList</link>*      <link linkend="gnome-vfs-uri-list-ref">gnome_vfs_uri_list_ref</link>          (<link linkend="GList">GList</link> *list);
<link linkend="GList">GList</link>*      <link linkend="gnome-vfs-uri-list-unref">gnome_vfs_uri_list_unref</link>        (<link linkend="GList">GList</link> *list);
<link linkend="GList">GList</link>*      <link linkend="gnome-vfs-uri-list-copy">gnome_vfs_uri_list_copy</link>         (<link linkend="GList">GList</link> *list);
<link linkend="void">void</link>        <link linkend="gnome-vfs-uri-list-free">gnome_vfs_uri_list_free</link>         (<link linkend="GList">GList</link> *list);
<link linkend="char">char</link>*       <link linkend="gnome-vfs-uri-make-full-from-relative">gnome_vfs_uri_make_full_from_relative</link>
                                            (const <link linkend="char">char</link> *base_uri,
                                             const <link linkend="char">char</link> *relative_uri);
</synopsis>
</refsynopsisdiv>









<refsect1 id="desc">
<title id="desc.title">Description</title>
<para>

</para>
</refsect1>

<refsect1 id="details">
<title id="details.title">Details</title>
<refsect2>
<title><anchor id="GnomeVFSURI" role="struct"/>GnomeVFSURI</title>
<indexterm><primary>GnomeVFSURI</primary></indexterm><programlisting>typedef struct {
	/* Reference count.  */
	guint ref_count;

	/* Text for the element: eg. some/path/name.  */
	gchar *text;

	/* Text for uri fragment: eg, #anchor  */
	gchar *fragment_id;
	
	/* Method string: eg. `gzip', `tar', `http'.  This is necessary as
	   one GnomeVFSMethod can be used for different method strings
	   (e.g. extfs handles zip, rar, zoo and several other ones).  */
	gchar *method_string;

	/* VFS method to access the element.  */
	struct GnomeVFSMethod *method;

	/* Pointer to the parent element, or NULL for toplevel elements.  */
	struct GnomeVFSURI *parent;

	/* Reserved to avoid future breaks in ABI compatibility */
	void *reserved1;
	void *reserved2;
} GnomeVFSURI;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="GnomeVFSToplevelURI" role="struct"/>GnomeVFSToplevelURI</title>
<indexterm><primary>GnomeVFSToplevelURI</primary></indexterm><programlisting>typedef struct {
	/* Base object.  */
	GnomeVFSURI uri;

	/* Server location information.  */
	gchar *host_name;
	guint host_port;

	/* Authorization information. (unescaped) */
	gchar *user_name;
	gchar *password;

	/* The parent URN, if it exists */
	gchar *urn;

	/* Reserved to avoid future breaks in ABI compatibility */
	void *reserved1;
	void *reserved2;
} GnomeVFSToplevelURI;
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="GnomeVFSURIHideOptions" role="enum"/>enum GnomeVFSURIHideOptions</title>
<indexterm><primary>GnomeVFSURIHideOptions</primary></indexterm><programlisting>typedef enum
{
	GNOME_VFS_URI_HIDE_NONE = 0,
	GNOME_VFS_URI_HIDE_USER_NAME = 1 &lt;&lt; 0,
	GNOME_VFS_URI_HIDE_PASSWORD = 1 &lt;&lt; 1,
	GNOME_VFS_URI_HIDE_HOST_NAME = 1 &lt;&lt; 2,
	GNOME_VFS_URI_HIDE_HOST_PORT = 1 &lt;&lt; 3,
	GNOME_VFS_URI_HIDE_TOPLEVEL_METHOD = 1 &lt;&lt; 4,
	GNOME_VFS_URI_HIDE_FRAGMENT_IDENTIFIER = 1 &lt;&lt; 8
} GnomeVFSURIHideOptions; 
</programlisting>
<para>
Packed boolean bitfield controlling hiding of various elements
of a GnomeVFSURI when it is converted to a string.</para>
<para>

</para><variablelist role="enum">
<varlistentry>
<term><literal>GNOME_VFS_URI_HIDE_NONE</literal></term>
<listitem><simpara> don't hide anything
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>GNOME_VFS_URI_HIDE_USER_NAME</literal></term>
<listitem><simpara> hide the user name
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>GNOME_VFS_URI_HIDE_PASSWORD</literal></term>
<listitem><simpara> hide the password
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>GNOME_VFS_URI_HIDE_HOST_NAME</literal></term>
<listitem><simpara> hide the host name
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>GNOME_VFS_URI_HIDE_HOST_PORT</literal></term>
<listitem><simpara> hide the port
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>GNOME_VFS_URI_HIDE_TOPLEVEL_METHOD</literal></term>
<listitem><simpara> hide the method (e.g. http, file)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><literal>GNOME_VFS_URI_HIDE_FRAGMENT_IDENTIFIER</literal></term>
<listitem><simpara> hide the fragment identifier
</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="GNOME-VFS-URI-MAGIC-CHR:CAPS" role="macro"/>GNOME_VFS_URI_MAGIC_CHR</title>
<indexterm><primary>GNOME_VFS_URI_MAGIC_CHR</primary></indexterm><programlisting>#define GNOME_VFS_URI_MAGIC_CHR	'#'
</programlisting>
<para>
The character used to divide location from
extra "arguments" passed to the method.</para>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="GNOME-VFS-URI-MAGIC-STR:CAPS" role="macro"/>GNOME_VFS_URI_MAGIC_STR</title>
<indexterm><primary>GNOME_VFS_URI_MAGIC_STR</primary></indexterm><programlisting>#define GNOME_VFS_URI_MAGIC_STR "#"
</programlisting>
<para>
The character used to divide location from
extra "arguments" passed to the method.</para>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="GNOME-VFS-URI-PATH-CHR:CAPS" role="macro"/>GNOME_VFS_URI_PATH_CHR</title>
<indexterm><primary>GNOME_VFS_URI_PATH_CHR</primary></indexterm><programlisting>#define GNOME_VFS_URI_PATH_CHR '/'
</programlisting>
<para>
Defines the path seperator character.</para>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="GNOME-VFS-URI-PATH-STR:CAPS" role="macro"/>GNOME_VFS_URI_PATH_STR</title>
<indexterm><primary>GNOME_VFS_URI_PATH_STR</primary></indexterm><programlisting>#define GNOME_VFS_URI_PATH_STR "/"
</programlisting>
<para>
Defines the path seperator string.</para>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-new" role="function"/>gnome_vfs_uri_new ()</title>
<indexterm><primary>gnome_vfs_uri_new</primary></indexterm><programlisting><link linkend="GnomeVFSURI">GnomeVFSURI</link>* gnome_vfs_uri_new              (const <link linkend="gchar">gchar</link> *text_uri);</programlisting>
<para>
Create a new uri from <parameter>text_uri</parameter>. Unsupported and unsafe methods
are not allowed and will result in <literal>NULL</literal> being returned. URL
transforms are allowed.
</para>
<para>
The <parameter>a</parameter> text_uri must be an escaped URI string such as returned by 
<link linkend="gnome-vfs-get-uri-from-local-path"><function>gnome_vfs_get_uri_from_local_path()</function></link>, <link linkend="gnome-vfs-make-uri-from-input"><function>gnome_vfs_make_uri_from_input()</function></link>, 
or <link linkend="gtk-file-chooser-get-uri"><function>gtk_file_chooser_get_uri()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>text_uri</parameter>&nbsp;:</term>
<listitem><simpara> an escaped string representing a uri.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The new uri.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-resolve-relative" role="function"/>gnome_vfs_uri_resolve_relative ()</title>
<indexterm><primary>gnome_vfs_uri_resolve_relative</primary></indexterm><programlisting><link linkend="GnomeVFSURI">GnomeVFSURI</link>* gnome_vfs_uri_resolve_relative (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *base,
                                             const <link linkend="gchar">gchar</link> *relative_reference);</programlisting>
<para>
Create a new uri from <parameter>relative_reference</parameter>, relative to <parameter>base</parameter>. The resolution
algorithm follows RFC 2396. For details, see section 5.2 of
http://www.ietf.org/rfc/rfc2396.txt .
</para>
<para>
In short, if the <parameter>base</parameter> uri ends in '/', <parameter>relative_reference</parameter> is appended to <parameter>base</parameter>,
otherwise it replaces the part of <parameter>base</parameter> after the last '/'.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>base</parameter>&nbsp;:</term>
<listitem><simpara> base uri.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>relative_reference</parameter>&nbsp;:</term>
<listitem><simpara> a string representing a possibly relative uri reference.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The new uri.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-ref" role="function"/>gnome_vfs_uri_ref ()</title>
<indexterm><primary>gnome_vfs_uri_ref</primary></indexterm><programlisting><link linkend="GnomeVFSURI">GnomeVFSURI</link>* gnome_vfs_uri_ref              (<link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
<para>
Increment <parameter>uri</parameter>'s reference count.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <parameter>uri</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-unref" role="function"/>gnome_vfs_uri_unref ()</title>
<indexterm><primary>gnome_vfs_uri_unref</primary></indexterm><programlisting><link linkend="void">void</link>        gnome_vfs_uri_unref             (<link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
<para>
Decrement <parameter>uri</parameter>'s reference count.  If the reference count reaches zero,
<parameter>uri</parameter> is destroyed.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-append-string" role="function"/>gnome_vfs_uri_append_string ()</title>
<indexterm><primary>gnome_vfs_uri_append_string</primary></indexterm><programlisting><link linkend="GnomeVFSURI">GnomeVFSURI</link>* gnome_vfs_uri_append_string    (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri,
                                             const <link linkend="char">char</link> *uri_fragment);</programlisting>
<para>
Create a new uri obtained by appending <parameter>uri_fragment</parameter> to <parameter>uri</parameter>.  This will take care
of adding an appropriate directory separator between the end of <parameter>uri</parameter> and
the start of <parameter>uri_fragment</parameter> if necessary.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>uri_fragment</parameter>&nbsp;:</term>
<listitem><simpara> a piece of a uri (ie a fully escaped partial path).
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The new uri obtained by combining <parameter>uri</parameter> and <parameter>uri_fragment</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-append-path" role="function"/>gnome_vfs_uri_append_path ()</title>
<indexterm><primary>gnome_vfs_uri_append_path</primary></indexterm><programlisting><link linkend="GnomeVFSURI">GnomeVFSURI</link>* gnome_vfs_uri_append_path      (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri,
                                             const <link linkend="char">char</link> *path);</programlisting>
<para>
Create a new uri obtained by appending <parameter>path</parameter> to <parameter>uri</parameter>.  This will take care
of adding an appropriate directory separator between the end of <parameter>uri</parameter> and
the start of <parameter>path</parameter> if necessary as well as escaping <parameter>path</parameter> as necessary.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>path</parameter>&nbsp;:</term>
<listitem><simpara> a non-escaped file path.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The new uri obtained by combining <parameter>uri</parameter> and <parameter>path</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-append-file-name" role="function"/>gnome_vfs_uri_append_file_name ()</title>
<indexterm><primary>gnome_vfs_uri_append_file_name</primary></indexterm><programlisting><link linkend="GnomeVFSURI">GnomeVFSURI</link>* gnome_vfs_uri_append_file_name (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri,
                                             const <link linkend="gchar">gchar</link> *filename);</programlisting>
<para>
Create a new uri obtained by appending <parameter>file_name</parameter> to <parameter>uri</parameter>.  This will take care
of adding an appropriate directory separator between the end of <parameter>uri</parameter> and
the start of <parameter>file_name</parameter> if necessary. <parameter>file_name</parameter> might, for instance, be the 
result of a call to <link linkend="g-dir-read-name"><function>g_dir_read_name()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>filename</parameter>&nbsp;:</term>
<listitem><simpara> any "regular" file name (can include #, /, etc) in the file system encoding. This is not an escaped URI.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The new uri obtained by combining <parameter>uri</parameter> and <parameter>path</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-to-string" role="function"/>gnome_vfs_uri_to_string ()</title>
<indexterm><primary>gnome_vfs_uri_to_string</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*      gnome_vfs_uri_to_string         (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri,
                                             <link linkend="GnomeVFSURIHideOptions">GnomeVFSURIHideOptions</link> hide_options);</programlisting>
<para>
Translate <parameter>uri</parameter> into a printable string.  The string will not
contain the uri elements specified by <parameter>hide_options</parameter>.
</para>
<para>
A file: URI on Win32 might look like file:///x:/foo/bar.txt. Note
that the part after file:// is not a legal file name, you need to
remove the / in front of the drive letter. This function does that
automatically if <parameter>hide_options</parameter> specifies that the toplevel method,
user name, password, host name and host port should be hidden.
</para>
<para>
On the other hand, a file: URI for a UNC path looks like
file:////server/share/foo/bar.txt, and in that case the part after
file:// is the correct file name.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>hide_options</parameter>&nbsp;:</term>
<listitem><simpara> bitmask specifying what uri elements (e.g. password,
user name etc.) should not be represented in the returned string.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a malloc'd printable string representing <parameter>uri</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-dup" role="function"/>gnome_vfs_uri_dup ()</title>
<indexterm><primary>gnome_vfs_uri_dup</primary></indexterm><programlisting><link linkend="GnomeVFSURI">GnomeVFSURI</link>* gnome_vfs_uri_dup              (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
<para>
Duplicate <parameter>uri</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to a new uri that is exactly the same as <parameter>uri</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-is-local" role="function"/>gnome_vfs_uri_is_local ()</title>
<indexterm><primary>gnome_vfs_uri_is_local</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gnome_vfs_uri_is_local          (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
<para>
Check if <parameter>uri</parameter> is a local URI. Note that the return value of this
function entirely depends on the <link linkend="GnomeVFSMethod"><type>GnomeVFSMethod</type></link> associated with the
URI. It is up to the method author to distinguish between remote URIs
add URIs referring to entities on the local computer.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <literal>TRUE</literal> if <parameter>uri</parameter> refers to a local entity, <literal>FALSE</literal> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-has-parent" role="function"/>gnome_vfs_uri_has_parent ()</title>
<indexterm><primary>gnome_vfs_uri_has_parent</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gnome_vfs_uri_has_parent        (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
<para>
Check if uri has a parent or not.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <literal>TRUE</literal> if <parameter>uri</parameter> has a parent, <literal>FALSE</literal> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-get-parent" role="function"/>gnome_vfs_uri_get_parent ()</title>
<indexterm><primary>gnome_vfs_uri_get_parent</primary></indexterm><programlisting><link linkend="GnomeVFSURI">GnomeVFSURI</link>* gnome_vfs_uri_get_parent       (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
<para>
Retrieve <parameter>uri</parameter>'s parent uri.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to <parameter>uri</parameter>'s parent uri.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-get-toplevel" role="function"/>gnome_vfs_uri_get_toplevel ()</title>
<indexterm><primary>gnome_vfs_uri_get_toplevel</primary></indexterm><programlisting><link linkend="GnomeVFSToplevelURI">GnomeVFSToplevelURI</link>* gnome_vfs_uri_get_toplevel
                                            (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
<para>
Retrieve the toplevel uri in <parameter>uri</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the toplevel uri object.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-get-host-name" role="function"/>gnome_vfs_uri_get_host_name ()</title>
<indexterm><primary>gnome_vfs_uri_get_host_name</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>* gnome_vfs_uri_get_host_name    (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
<para>
Retrieve the host name for <parameter>uri</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a string representing the host name.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-get-scheme" role="function"/>gnome_vfs_uri_get_scheme ()</title>
<indexterm><primary>gnome_vfs_uri_get_scheme</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>* gnome_vfs_uri_get_scheme       (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
<para>
Retrieve the scheme used for <parameter>uri</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a string representing the scheme.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-get-host-port" role="function"/>gnome_vfs_uri_get_host_port ()</title>
<indexterm><primary>gnome_vfs_uri_get_host_port</primary></indexterm><programlisting><link linkend="guint">guint</link>       gnome_vfs_uri_get_host_port     (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
<para>
Retrieve the host port number in <parameter>uri</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The host port number used by <parameter>uri</parameter>.  If the value is zero, the
default port value for the specified toplevel access method is used.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-get-user-name" role="function"/>gnome_vfs_uri_get_user_name ()</title>
<indexterm><primary>gnome_vfs_uri_get_user_name</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>* gnome_vfs_uri_get_user_name    (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
<para>
Retrieve the user name in <parameter>uri</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a string representing the user name in <parameter>uri</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-get-password" role="function"/>gnome_vfs_uri_get_password ()</title>
<indexterm><primary>gnome_vfs_uri_get_password</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>* gnome_vfs_uri_get_password     (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
<para>
Retrieve the password for <parameter>uri</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The password for <parameter>uri</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-set-host-name" role="function"/>gnome_vfs_uri_set_host_name ()</title>
<indexterm><primary>gnome_vfs_uri_set_host_name</primary></indexterm><programlisting><link linkend="void">void</link>        gnome_vfs_uri_set_host_name     (<link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri,
                                             const <link linkend="gchar">gchar</link> *host_name);</programlisting>
<para>
Set <parameter>host_name</parameter> as the host name accessed by <parameter>uri</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>host_name</parameter>&nbsp;:</term>
<listitem><simpara> a string representing a host name.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-set-host-port" role="function"/>gnome_vfs_uri_set_host_port ()</title>
<indexterm><primary>gnome_vfs_uri_set_host_port</primary></indexterm><programlisting><link linkend="void">void</link>        gnome_vfs_uri_set_host_port     (<link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri,
                                             <link linkend="guint">guint</link> host_port);</programlisting>
<para>
Set the host port number in <parameter>uri</parameter>.  If <parameter>host_port</parameter> is zero, the default port
for <parameter>uri</parameter>'s toplevel access method is used.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>host_port</parameter>&nbsp;:</term>
<listitem><simpara> a TCP/IP port number.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-set-user-name" role="function"/>gnome_vfs_uri_set_user_name ()</title>
<indexterm><primary>gnome_vfs_uri_set_user_name</primary></indexterm><programlisting><link linkend="void">void</link>        gnome_vfs_uri_set_user_name     (<link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri,
                                             const <link linkend="gchar">gchar</link> *user_name);</programlisting>
<para>
Set <parameter>user_name</parameter> as the user name for <parameter>uri</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_name</parameter>&nbsp;:</term>
<listitem><simpara> a string representing a user name on the host accessed by <parameter>uri</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-set-password" role="function"/>gnome_vfs_uri_set_password ()</title>
<indexterm><primary>gnome_vfs_uri_set_password</primary></indexterm><programlisting><link linkend="void">void</link>        gnome_vfs_uri_set_password      (<link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri,
                                             const <link linkend="gchar">gchar</link> *password);</programlisting>
<para>
Set <parameter>password</parameter> as the password for <parameter>uri</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>password</parameter>&nbsp;:</term>
<listitem><simpara> a password string.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-equal" role="function"/>gnome_vfs_uri_equal ()</title>
<indexterm><primary>gnome_vfs_uri_equal</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gnome_vfs_uri_equal             (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *a,
                                             const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *b);</programlisting>
<para>
Compare <parameter>a</parameter> and <parameter>b</parameter>.
</para>
<para>
FIXME: This comparison should take into account the possiblity
that unreserved characters may be escaped.
...or perhaps <link linkend="gnome-vfs-uri-new"><function>gnome_vfs_uri_new()</function></link> should unescape unreserved characters?</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>a</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>b</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <literal>TRUE</literal> if <parameter>a</parameter> and <parameter>b</parameter> are equal, <literal>FALSE</literal> otherwise.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-is-parent" role="function"/>gnome_vfs_uri_is_parent ()</title>
<indexterm><primary>gnome_vfs_uri_is_parent</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    gnome_vfs_uri_is_parent         (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *possible_parent,
                                             const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *possible_child,
                                             <link linkend="gboolean">gboolean</link> recursive);</programlisting>
<para>
Check if <parameter>possible_child</parameter> is contained by <parameter>possible_parent</parameter>.
If <parameter>recursive</parameter> is <literal>FALSE</literal>, just try the immediate parent directory, else
search up through the hierarchy.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>possible_parent</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>possible_child</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>recursive</parameter>&nbsp;:</term>
<listitem><simpara> a flag to turn recursive check on.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <literal>TRUE</literal> if <parameter>possible_child</parameter> is contained in  <parameter>possible_parent</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-get-path" role="function"/>gnome_vfs_uri_get_path ()</title>
<indexterm><primary>gnome_vfs_uri_get_path</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>* gnome_vfs_uri_get_path         (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
<para>
Retrieve full path name for <parameter>uri</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the full path name in <parameter>uri</parameter>.  Notice that the
pointer points to the path name stored in <parameter>uri</parameter>, so the path name returned must not
be modified nor freed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-get-fragment-identifier" role="function"/>gnome_vfs_uri_get_fragment_identifier ()</title>
<indexterm><primary>gnome_vfs_uri_get_fragment_identifier</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>* gnome_vfs_uri_get_fragment_identifier
                                            (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-extract-dirname" role="function"/>gnome_vfs_uri_extract_dirname ()</title>
<indexterm><primary>gnome_vfs_uri_extract_dirname</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*      gnome_vfs_uri_extract_dirname   (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
<para>
Extract the name of the directory in which the file pointed to by <parameter>uri</parameter> is
stored as a newly allocated string.  The string will end with a
<literal>GNOME_VFS_URI_PATH_CHR</literal>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the newly allocated string representing the
parent directory.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-extract-short-name" role="function"/>gnome_vfs_uri_extract_short_name ()</title>
<indexterm><primary>gnome_vfs_uri_extract_short_name</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*      gnome_vfs_uri_extract_short_name
                                            (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
<para>
Retrieve base file name for <parameter>uri</parameter>, ignoring any trailing path separators.
This matches the XPG definition of basename, but not g_basename. This is
often useful when you want the name of something that's pointed to by a
uri, and don't care whether the uri has a directory or file form.
If <parameter>uri</parameter> points to the root of a domain, returns the host name. If there's
no host name, returns <literal>GNOME_VFS_URI_PATH_STR</literal>.
</para>
<para>
See also: <link linkend="gnome-vfs-uri-extract-short-path-name"><function>gnome_vfs_uri_extract_short_path_name()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the newly allocated string representing the
unescaped short form of the name.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-extract-short-path-name" role="function"/>gnome_vfs_uri_extract_short_path_name ()</title>
<indexterm><primary>gnome_vfs_uri_extract_short_path_name</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*      gnome_vfs_uri_extract_short_path_name
                                            (const <link linkend="GnomeVFSURI">GnomeVFSURI</link> *uri);</programlisting>
<para>
Retrieve base file name for <parameter>uri</parameter>, ignoring any trailing path separators.
This matches the XPG definition of basename, but not g_basename. This is
often useful when you want the name of something that's pointed to by a
uri, and don't care whether the uri has a directory or file form.
If <parameter>uri</parameter> points to the root (including the root of any domain),
returns <literal>GNOME_VFS_URI_PATH_STR</literal>.
</para>
<para>
See also: <link linkend="gnome-vfs-uri-extract-short-name"><function>gnome_vfs_uri_extract_short_name()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to the newly allocated string representing the
escaped short form of the name.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-hequal" role="function"/>gnome_vfs_uri_hequal ()</title>
<indexterm><primary>gnome_vfs_uri_hequal</primary></indexterm><programlisting><link linkend="gint">gint</link>        gnome_vfs_uri_hequal            (<link linkend="gconstpointer">gconstpointer</link> a,
                                             <link linkend="gconstpointer">gconstpointer</link> b);</programlisting>
<para>
Function intended for use as a hash table "are these two items
the same" comparison. Useful for creating a hash table of uris.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>a</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>b</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <literal>TRUE</literal> if the uris are the same.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-hash" role="function"/>gnome_vfs_uri_hash ()</title>
<indexterm><primary>gnome_vfs_uri_hash</primary></indexterm><programlisting><link linkend="guint">guint</link>       gnome_vfs_uri_hash              (<link linkend="gconstpointer">gconstpointer</link> p);</programlisting>
<para>
Creates an integer value from a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>, appropriate
for using as the key to a hash table entry.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>p</parameter>&nbsp;:</term>
<listitem><simpara> a pointer to a <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a hash key corresponding to <parameter>p</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-list-parse" role="function"/>gnome_vfs_uri_list_parse ()</title>
<indexterm><primary>gnome_vfs_uri_list_parse</primary></indexterm><programlisting><link linkend="GList">GList</link>*      gnome_vfs_uri_list_parse        (const <link linkend="gchar">gchar</link> *uri_list);</programlisting>
<para>
Extracts a list of <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link> objects from a standard text/uri-list,
such as one you would get on a drop operation.  Use
<link linkend="gnome-vfs-uri-list-free"><function>gnome_vfs_uri_list_free()</function></link> when you are done with the list.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>uri_list</parameter>&nbsp;:</term>
<listitem><simpara> string consists of <link linkend="GnomeVFSURIs"><type>GnomeVFSURIs</type></link> and/or paths seperated by newline character.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a <link linkend="GList"><type>GList</type></link> of <link linkend="GnomeVFSURIs"><type>GnomeVFSURIs</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-list-ref" role="function"/>gnome_vfs_uri_list_ref ()</title>
<indexterm><primary>gnome_vfs_uri_list_ref</primary></indexterm><programlisting><link linkend="GList">GList</link>*      gnome_vfs_uri_list_ref          (<link linkend="GList">GList</link> *list);</programlisting>
<para>
Increments the reference count of the items in <parameter>list</parameter> by one.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>list</parameter>&nbsp;:</term>
<listitem><simpara> list of <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link> elements.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <parameter>list</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-list-unref" role="function"/>gnome_vfs_uri_list_unref ()</title>
<indexterm><primary>gnome_vfs_uri_list_unref</primary></indexterm><programlisting><link linkend="GList">GList</link>*      gnome_vfs_uri_list_unref        (<link linkend="GList">GList</link> *list);</programlisting>
<para>
Decrements the reference count of the items in <parameter>list</parameter> by one.
Note that the list is *not freed* even if each member of the list
is freed.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>list</parameter>&nbsp;:</term>
<listitem><simpara> list of <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link> elements.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <parameter>list</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-list-copy" role="function"/>gnome_vfs_uri_list_copy ()</title>
<indexterm><primary>gnome_vfs_uri_list_copy</primary></indexterm><programlisting><link linkend="GList">GList</link>*      gnome_vfs_uri_list_copy         (<link linkend="GList">GList</link> *list);</programlisting>
<para>
Creates a duplicate of <parameter>list</parameter>, and references each member of
that list.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>list</parameter>&nbsp;:</term>
<listitem><simpara> list of <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link> elements.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly referenced duplicate of <parameter>list</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-list-free" role="function"/>gnome_vfs_uri_list_free ()</title>
<indexterm><primary>gnome_vfs_uri_list_free</primary></indexterm><programlisting><link linkend="void">void</link>        gnome_vfs_uri_list_free         (<link linkend="GList">GList</link> *list);</programlisting>
<para>
Decrements the reference count of each member of <parameter>list</parameter> by one,
and frees the list itself.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>list</parameter>&nbsp;:</term>
<listitem><simpara> list of <link linkend="GnomeVFSURI"><type>GnomeVFSURI</type></link> elements.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="gnome-vfs-uri-make-full-from-relative" role="function"/>gnome_vfs_uri_make_full_from_relative ()</title>
<indexterm><primary>gnome_vfs_uri_make_full_from_relative</primary></indexterm><programlisting><link linkend="char">char</link>*       gnome_vfs_uri_make_full_from_relative
                                            (const <link linkend="char">char</link> *base_uri,
                                             const <link linkend="char">char</link> *relative_uri);</programlisting>
<para>
Returns a full uri given a full base uri, and a secondary uri which may
be relative.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>base_uri</parameter>&nbsp;:</term>
<listitem><simpara> a string representing the base uri.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>relative_uri</parameter>&nbsp;:</term>
<listitem><simpara> a uri fragment/reference to be appended to <parameter>base_uri</parameter>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly allocated string containing the uri 
(<literal>NULL</literal> for some bad errors).
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
