<refentry id="thunar-vfs-ThunarVfsInfo">
<refmeta>
<refentrytitle>ThunarVfsInfo</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>THUNAR-VFS Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>ThunarVfsInfo</refname><refpurpose></refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>

<synopsis>

#include &lt;thunar-vfs/thunar-vfs.h&gt;


<link linkend="ThunarVfsInfo">ThunarVfsInfo</link>* <link linkend="thunar-vfs-info-new-for-path">thunar_vfs_info_new_for_path</link> (<link linkend="ThunarVfsPath">ThunarVfsPath</link> *path,
                                             <link linkend="GError">GError</link> **error);
<link linkend="ThunarVfsInfo">ThunarVfsInfo</link>* <link linkend="thunar-vfs-info-ref">thunar_vfs_info_ref</link>          (<link linkend="ThunarVfsInfo">ThunarVfsInfo</link> *info);
<link linkend="void">void</link>        <link linkend="thunar-vfs-info-unref">thunar_vfs_info_unref</link>           (<link linkend="ThunarVfsInfo">ThunarVfsInfo</link> *info);
<link linkend="gboolean">gboolean</link>    <link linkend="thunar-vfs-info-execute">thunar_vfs_info_execute</link>         (const <link linkend="ThunarVfsInfo">ThunarVfsInfo</link> *info,
                                             <link linkend="GdkScreen">GdkScreen</link> *screen,
                                             <link linkend="GList">GList</link> *path_list,
                                             <link linkend="GError">GError</link> **error);
<link linkend="gboolean">gboolean</link>    <link linkend="thunar-vfs-info-rename">thunar_vfs_info_rename</link>          (<link linkend="ThunarVfsInfo">ThunarVfsInfo</link> *info,
                                             const <link linkend="gchar">gchar</link> *name,
                                             <link linkend="GError">GError</link> **error);
const <link linkend="gchar">gchar</link>* <link linkend="thunar-vfs-info-get-hint">thunar_vfs_info_get_hint</link>       (const <link linkend="ThunarVfsInfo">ThunarVfsInfo</link> *info,
                                             <link linkend="ThunarVfsFileHint">ThunarVfsFileHint</link> hint);
<link linkend="gboolean">gboolean</link>    <link linkend="thunar-vfs-info-matches">thunar_vfs_info_matches</link>         (const <link linkend="ThunarVfsInfo">ThunarVfsInfo</link> *a,
                                             const <link linkend="ThunarVfsInfo">ThunarVfsInfo</link> *b);
<link linkend="void">void</link>        <link linkend="thunar-vfs-info-list-free">thunar_vfs_info_list_free</link>       (<link linkend="GList">GList</link> *info_list);


</synopsis>
</refsynopsisdiv>









<refsect1>
<title>Description</title>
<para>

</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="thunar-vfs-info-new-for-path"/>thunar_vfs_info_new_for_path ()</title>
<indexterm><primary>thunar_vfs_info_new_for_path</primary></indexterm><programlisting><link linkend="ThunarVfsInfo">ThunarVfsInfo</link>* thunar_vfs_info_new_for_path (<link linkend="ThunarVfsPath">ThunarVfsPath</link> *path,
                                             <link linkend="GError">GError</link> **error);</programlisting>
<para>
Queries the <link linkend="ThunarVfsInfo"><type>ThunarVfsInfo</type></link> for the given <parameter>path</parameter>. Returns the
<link linkend="ThunarVfsInfo"><type>ThunarVfsInfo</type></link> if the operation is successfull, else <literal>NULL</literal>.
In the latter case, <parameter>error</parameter> will be set to point to a <link linkend="GError"><type>GError</type></link>
describing the cause of the failure.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>path</parameter>&nbsp;:</term>
<listitem><simpara> the <link linkend="ThunarVfsPath"><type>ThunarVfsPath</type></link> of the file whose info should be queried.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
<listitem><simpara> return location for errors or <literal>NULL</literal>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <link linkend="ThunarVfsInfo"><type>ThunarVfsInfo</type></link> for <parameter>path</parameter> or <literal>NULL</literal>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-info-ref"/>thunar_vfs_info_ref ()</title>
<indexterm><primary>thunar_vfs_info_ref</primary></indexterm><programlisting><link linkend="ThunarVfsInfo">ThunarVfsInfo</link>* thunar_vfs_info_ref          (<link linkend="ThunarVfsInfo">ThunarVfsInfo</link> *info);</programlisting>
<para>
Increments the reference count on <parameter>info</parameter> by 1 and
returns a pointer to <parameter>info</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>info</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsInfo"><type>ThunarVfsInfo</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a pointer to <parameter>info</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-info-unref"/>thunar_vfs_info_unref ()</title>
<indexterm><primary>thunar_vfs_info_unref</primary></indexterm><programlisting><link linkend="void">void</link>        thunar_vfs_info_unref           (<link linkend="ThunarVfsInfo">ThunarVfsInfo</link> *info);</programlisting>
<para>
Decrements the reference count on <parameter>info</parameter> by 1 and if
the reference count drops to zero as a result of this
operation, the <parameter>info</parameter> will be freed completely.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>info</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsInfo"><type>ThunarVfsInfo</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-info-execute"/>thunar_vfs_info_execute ()</title>
<indexterm><primary>thunar_vfs_info_execute</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    thunar_vfs_info_execute         (const <link linkend="ThunarVfsInfo">ThunarVfsInfo</link> *info,
                                             <link linkend="GdkScreen">GdkScreen</link> *screen,
                                             <link linkend="GList">GList</link> *path_list,
                                             <link linkend="GError">GError</link> **error);</programlisting>
<para>
Executes the file referred to by <parameter>info</parameter>, given <parameter>path_list</parameter> as parameters,
on the specified <parameter>screen</parameter>. <parameter>info</parameter> may refer to either a regular,
executable file, or a <filename>.desktop</filename> file, whose
type is <literal>Application</literal>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>info</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsInfo"><type>ThunarVfsInfo</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>screen</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="GdkScreen"><type>GdkScreen</type></link> or <literal>NULL</literal> to use the default <link linkend="GdkScreen"><type>GdkScreen</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>path_list</parameter>&nbsp;:</term>
<listitem><simpara> the list of <link linkend="ThunarVfsPath"><type>ThunarVfsPath</type></link><!---->s to give as parameters
             to the file referred to by <parameter>info</parameter> on execution.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
<listitem><simpara> return location for errors or <literal>NULL</literal>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <literal>TRUE</literal> on success, else <literal>FALSE</literal>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-info-rename"/>thunar_vfs_info_rename ()</title>
<indexterm><primary>thunar_vfs_info_rename</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    thunar_vfs_info_rename          (<link linkend="ThunarVfsInfo">ThunarVfsInfo</link> *info,
                                             const <link linkend="gchar">gchar</link> *name,
                                             <link linkend="GError">GError</link> **error);</programlisting>
<para>
Tries to rename the file referred to by <parameter>info</parameter> to the
new <parameter>name</parameter>.
</para>
<para>
The rename operation is smart in that it checks the
type of <parameter>info</parameter> first, and if <parameter>info</parameter> refers to a
<filename>.desktop</filename> file, the file name
won't be touched, but instead the <literal>Name</literal>
field of the <filename>.desktop</filename> will be
changed to <parameter>name</parameter>. Else, if <parameter>info</parameter> refers to a regular
file or directory, the file will be given a new
name.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>info</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsInfo"><type>ThunarVfsInfo</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> the new file name in UTF-8 encoding.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
<listitem><simpara> return location for errors or <literal>NULL</literal>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <literal>TRUE</literal> on success, else <literal>FALSE</literal>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-info-get-hint"/>thunar_vfs_info_get_hint ()</title>
<indexterm><primary>thunar_vfs_info_get_hint</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>* thunar_vfs_info_get_hint       (const <link linkend="ThunarVfsInfo">ThunarVfsInfo</link> *info,
                                             <link linkend="ThunarVfsFileHint">ThunarVfsFileHint</link> hint);</programlisting>
<para>
If <parameter>info</parameter> provides the <parameter>hint</parameter>, then the value available for
<parameter>hint</parameter> will be returned. Else <literal>NULL</literal> will be returned.
</para>
<para>
The returned string - if any - is owned by <parameter>info</parameter> and must
not be freed by the caller. You should thereby note that the
returned string is no longer valid after <parameter>info</parameter> is finalized.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>info</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsInfo"><type>ThunarVfsInfo</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>hint</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsFileHint"><type>ThunarVfsFileHint</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the string stored for <parameter>hint</parameter> on <parameter>info</parameter> or <literal>NULL</literal>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-info-matches"/>thunar_vfs_info_matches ()</title>
<indexterm><primary>thunar_vfs_info_matches</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    thunar_vfs_info_matches         (const <link linkend="ThunarVfsInfo">ThunarVfsInfo</link> *a,
                                             const <link linkend="ThunarVfsInfo">ThunarVfsInfo</link> *b);</programlisting>
<para>
Checks whether <parameter>a</parameter> and <parameter>b</parameter> refer to the same file
and share the same properties.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>a</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsInfo"><type>ThunarVfsInfo</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>b</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="ThunarVfsInfo"><type>ThunarVfsInfo</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> match.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="thunar-vfs-info-list-free"/>thunar_vfs_info_list_free ()</title>
<indexterm><primary>thunar_vfs_info_list_free</primary></indexterm><programlisting><link linkend="void">void</link>        thunar_vfs_info_list_free       (<link linkend="GList">GList</link> *info_list);</programlisting>
<para>
Unrefs all <link linkend="ThunarVfsInfo"><type>ThunarVfsInfo</type></link><!---->s in <parameter>info_list</parameter> and
frees the list itself.
</para>
<para>
This method always returns <literal>NULL</literal> for the convenience of
being able to do:
<informalexample><programlisting>
info_list = thunar_vfs_info_list_free (info_list);
</programlisting></informalexample></para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>info_list</parameter>&nbsp;:</term>
<listitem><simpara> a list <link linkend="ThunarVfsInfo"><type>ThunarVfsInfo</type></link><!---->s.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
