1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349
|
<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="class-thunarx-python-file-info">
<refnamediv>
<refname>Thunarx.FileInfo</refname>
<refpurpose>Thunarx.FileInfo Reference</refpurpose>
</refnamediv>
<!-- ******************************* -->
<!-- BEGIN OF NAUTILUS-PYTHON SYNOPSIS -->
<!-- ******************************* -->
<refsect1>
<title>Synopsis</title>
<classsynopsis language="python">
<ooclass><classname>Thunarx.FileInfo</classname></ooclass>
<ooclass><classname><link linkend="class-ginterface">GObject.GInterface</link></classname></ooclass>
<methodsynopsis language="python">
<methodname><link linkend="method-thunarx-python-file-info--get-name">get_name</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-thunarx-python-file-info--get-uri">get_uri</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-thunarx-python-file-info--get-parent-uri">get_parent_uri</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-thunarx-python-file-info--get-uri-scheme">get_uri_scheme</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-thunarx-python-file-info--get-mime-type">get_mime_type</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-thunarx-python-file-info--has-mime-type">has_mime_type</link></methodname>
<methodparam><parameter role="keyword">mime_type</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-thunarx-python-file-info--is-directory">is_directory</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-thunarx-python-file-info--get-file-info">get_file_info</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-thunarx-python-file-info--get-filesystem-info">get_filesystem_info</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-thunarx-python-file-info--get-location">get_location</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-thunarx-python-file-info--changed">changed</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-thunarx-python-file-info--renamed">renamed</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
</classsynopsis>
</refsect1>
<!-- ********************************* -->
<!-- BEGIN OF ANCESTRY -->
<!-- ********************************* -->
<refsect1>
<title>Ancestry</title>
<synopsis>+-- <link linkend="class-ginterface">GObject.GInterface</link>
+-- <link linkend="class-thunarx-python-file-info">Thunarx.FileInfo</link>
</synopsis>
</refsect1>
<!-- ********************************** -->
<!-- BEGIN OF DESCRIPTION -->
<!-- ********************************** -->
<refsect1 id="description-file-info">
<title>Description</title>
<para>
Each <link linkend="class-thunarx-python-file-info"><classname>Thunarx.FileInfo</classname></link> object is an abstraction
of a real file.
</para>
</refsect1>
<!-- ****************************************** -->
<!-- BEGIN OF SIGNAL PROTOTYPES -->
<!-- ****************************************** -->
<refsect1>
<title>Signals</title>
<variablelist>
<varlistentry>
<term><link linkend="signal-thunarx-python-file-info--changed">"changed"</link></term>
<listitem>
<methodsynopsis language="python"><methodname>callback</methodname>
</methodsynopsis>
</listitem>
</varlistentry>
<varlistentry>
<term><link linkend="signal-thunarx-python-file-info--renamed">"renamed"</link></term>
<listitem>
<methodsynopsis language="python"><methodname>callback</methodname>
</methodsynopsis>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<!-- ******************************** -->
<!-- BEGIN OF METHODS -->
<!-- ******************************** -->
<refsect1>
<title>Public Methods</title>
<refsect2 id="method-thunarx-python-file-info--get-name">
<title>Thunarx.FileInfo.get_name</title>
<programlisting><methodsynopsis language="python">
<methodname>get_name</methodname>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>Returns the real name of the file represented by file_info in the local file system encoding.</simpara></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 id="method-thunarx-python-file-info--get-uri">
<title>Thunarx.FileInfo.get_uri</title>
<programlisting><methodsynopsis language="python">
<methodname>get_uri</methodname>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>Returns the escaped, fully qualified URI of the file object represented by file_info.</simpara></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 id="method-thunarx-python-file-info--get-parent-uri">
<title>Thunarx.FileInfo.get_parent_uri</title>
<programlisting><methodsynopsis language="python">
<methodname>get_parent_uri</methodname>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>Returns the URI to the parent file of file_info or NULL if file_info has no parent. Note that the parent URI may be of a different type than the URI of file_info. For example, the parent of "file:///" is "computer:///".</simpara></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 id="method-thunarx-python-file-info--get-uri-scheme">
<title>Thunarx.FileInfo.get_uri_scheme</title>
<programlisting><methodsynopsis language="python">
<methodname>get_uri_scheme</methodname>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>Returns the URI scheme of the file represented by file_info. E.g. if file_info refers to the file "file:///usr/home", the return value will be "file".</simpara></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 id="method-thunarx-python-file-info--get-mime-type">
<title>Thunarx.FileInfo.get_mime_type</title>
<programlisting><methodsynopsis language="python">
<methodname>get_mime_type</methodname>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>Returns the MIME-type of the file represented by file_info or NULL if no MIME-type is known for file_info.</simpara></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 id="method-thunarx-python-file-info--has-mime-type">
<title>Thunarx.FileInfo.has_mime_type</title>
<programlisting><methodsynopsis language="python">
<methodname>has_mime_type</methodname>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">mime_type</parameter> :</term>
<listitem><simpara>the mime_type to check for</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>
Checks whether file_info is of the given mime_type or whether the MIME-type of file_info is a subclass of mime_type.
This is the preferred way for most extensions to check whether they support a given file or not, and you should consider using this method rather than Thunarx.FileInfo.get_mime_type(). A simple example would be a menu extension that performs a certain action on text files. In this case you want to check whether a given Thunarx.FileInfo refers to any kind of text file, not only to "text/plain" (e.g. this also includes "text/xml" and "application/x-desktop").
But you should be aware that this method may take some time to test whether mime_type is valid for file_info, so don't call it too often.
</simpara></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 id="method-thunarx-python-file-info--is-directory">
<title>Thunarx.FileInfo.is_directory</title>
<programlisting><methodsynopsis language="python">
<methodname>is_directory</methodname>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>Checks whether file_info refers to a directory.</simpara></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 id="method-thunarx-python-file-info--get-file-info">
<title>Thunarx.FileInfo.get_file_info</title>
<programlisting><methodsynopsis language="python">
<methodname>get_file_info</methodname>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>Returns the GFileInfo object associated with file_info, which includes additional information about the file_info as queried from GIO earlier.</simpara></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 id="method-thunarx-python-file-info--get-filesystem-info">
<title>Thunarx.FileInfo.get_filesystem_info</title>
<programlisting><methodsynopsis language="python">
<methodname>get_filesystem_info</methodname>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>Returns the GFileInfo which includes additional information about the filesystem file_info resides on.</simpara></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 id="method-thunarx-python-file-info--get-location">
<title>Thunarx.FileInfo.get_location</title>
<programlisting><methodsynopsis language="python">
<methodname>get_location</methodname>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>Returns the GFile file_info points to. The GFile is a more powerful tool than just the URI or the path.</simpara></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 id="method-thunarx-python-file-info--changed">
<title>Thunarx.FileInfo.changed</title>
<programlisting><methodsynopsis language="python">
<methodname>changed</methodname>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>Emits the ::changed signal on file_info. This method should not be invoked by Thunar plugins, instead the file manager itself will use this method to emit ::changed whenever it notices a change on file_info.</simpara></listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2 id="method-thunarx-python-file-info--renamed">
<title>Thunarx.FileInfo.renamed</title>
<programlisting><methodsynopsis language="python">
<methodname>renamed</methodname>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>
Emits the ::renamed signal on file_info. This method should not be invoked by Thunar plugins, instead the file manager will emit this signal whenever the user renamed the file_info.
The plugins should instead connect to the ::renamed signal and update it's internal state and it's user interface after the file manager renamed a file.
</simpara></listitem>
</varlistentry>
</variablelist>
</refsect2>
</refsect1>
<!-- ******************************** -->
<!-- BEGIN OF SIGNAL DETAILS -->
<!-- ******************************** -->
<refsect1>
<title>Signal Details</title>
<refsect2 id="signal-thunarx-python-file-info--changed">
<title>The "changed" Thunarx.FileInfo Signal</title>
<para>
Emitted whenever the system notices a change to file_info.
</para><para>
Thunar plugins should use this signal to stay informed about changes to a file_info for which they currently display information (i.e. in a Thunarx.PropertyPage), and update it's user interface whenever a change is noticed on file_info.
</para>
</refsect2>
<refsect2 id="signal-thunarx-python-file-info--renamed">
<title>The "renamed" Thunarx.FileInfo Signal</title>
<para>
Emitted when the file_info is renamed to another name.
</para><para>
For example, within Thunar, ThunarFolder uses this signal to reregister it's VFS directory monitor, after the corresponding file was renamed.
</para>
</refsect2>
</refsect1>
</refentry>
|