<?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="matevfs-functions">
  <refnamediv>
    <refname>matevfs Functions</refname>
    <refpurpose>Additional functions which are not part of a class.</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>
    <!-- I apologize for the whitespace here.  It makes fugly HTML otherwise -->
    <programlisting><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--create">matevfs.create</link></methodname>
	<methodparam><parameter role="keyword">uri</parameter></methodparam>
	<methodparam><parameter role="keyword">open_mode</parameter><initializer>matevfs.OPEN_NONE</initializer></methodparam>
	<methodparam><parameter role="keyword">exclusive</parameter><initializer>False</initializer></methodparam>
	<methodparam><parameter role="keyword">perm</parameter><initializer>0666</initializer></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--get_file_info">matevfs.get_file_info</link></methodname>
	<methodparam><parameter role="keyword">uri</parameter></methodparam>
	<methodparam><parameter role="keyword">options</parameter><initializer>matevfs.FILE_INFO_DEFAULT</initializer></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--set_file_info">matevfs.set_file_info</link></methodname>
	<methodparam><parameter role="keyword">uri</parameter></methodparam>
	<methodparam><parameter role="keyword">info</parameter></methodparam>
	<methodparam><parameter role="keyword">mask</parameter><initializer>matevfs.SET_FILE_INFO_NONE</initializer></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--truncate">matevfs.truncate</link></methodname>
	<methodparam><parameter role="keyword">uri</parameter></methodparam>
	<methodparam><parameter role="keyword">length</parameter></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--make_directory">matevfs.make_directory</link></methodname>
	<methodparam><parameter role="keyword">uri</parameter></methodparam>
	<methodparam><parameter role="keyword">perm</parameter></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--remove_directory">matevfs.remove_directory</link></methodname>
	<methodparam><parameter role="keyword">uri</parameter></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--unlink">matevfs.unlink</link></methodname>
	<methodparam><parameter role="keyword">uri</parameter></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--exists">matevfs.exists</link></methodname>
	<methodparam><parameter role="keyword">uri</parameter></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--format_file_size_for_display">matevfs.format_file_size_for_display</link></methodname>
	<methodparam><parameter>size</parameter></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--get_mime_type">matevfs.get_mime_type</link></methodname>
	<methodparam><parameter>uri</parameter></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--get_mime_type_for_data">matevfs.get_mime_type_for_data</link></methodname>
	<methodparam><parameter>data</parameter></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--mime_get_icon">matevfs.mime_get_icon</link></methodname>
	<methodparam><parameter>mime_type</parameter></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_set_icon</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--mime_get_description">matevfs.mime_get_description</link></methodname>
	<methodparam><parameter>mime_type</parameter></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_set_description</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--mime_can_be_executable">matevfs.mime_can_be_executable</link></methodname>
	<methodparam><parameter>mime_type</parameter></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_set_can_be_executable</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--monitor_add">matevfs.monitor_add</link></methodname>
	<methodparam><parameter>text_uri</parameter></methodparam>
	<methodparam><parameter>monitor_type</parameter></methodparam>
	<methodparam><parameter>callback</parameter></methodparam>
	<methodparam><parameter>user_data</parameter><initializer>None</initializer></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--monitor_cancel">matevfs.monitor_cancel</link></methodname>
	<methodparam><parameter>id</parameter></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--read_entire_file">matevfs.read_entire_file</link></methodname>
	<methodparam><parameter>text_uri</parameter></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--mime_get_default_application">matevfs.mime_get_default_application</link></methodname>
	<methodparam><parameter>mime_type</parameter></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.xfer_uri</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.xfer_uri_list</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.xfer_delete_list</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_get_default_action_type</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_get_default_action</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_get_default_component</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_get_short_list_components</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_get_short_list_applications</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_get_all_applications</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_get_all_components</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_set_default_action_type</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_set_default_application</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_set_default_component</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_set_short_list_applications</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_set_short_list_components</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_add_application_to_short_list</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_remove_application_from_short_list</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_add_component_to_short_list</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_remove_component_from_short_list</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_add_extension</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_remove_extension</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_extend_all_applications</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_remove_from_all_applications</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.mime_application_new_from_id</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.connect_to_server</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.escape_string</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.escape_path_string</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.escape_host_and_path_string</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.escape_slashes</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.escape_set</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.unescape_string</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.make_uri_canonical</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.make_path_name_canonical</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.unescape_string_for_display</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.get_local_path_from_uri</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.get_uri_from_local_path</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.is_executable_command_string</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.get_volume_free_space</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.icon_path_from_filename</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.open_fd</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.is_primary_thread</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.format_uri_for_display</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.make_uri_from_input</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.make_uri_from_input_with_dirs</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.make_uri_canonical_strip_fragment</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.uris_match</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.get_uri_scheme</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.make_uri_from_shell_arg</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.url_show</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.resolve</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.dns_sd_browse_sync</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.dns_sd_resolve_sync</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.dns_sd_list_browse_domains_sync</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis><methodsynopsis language="python">
        <methodname><link linkend="function-matevfs--">matevfs.get_default_browse_domains</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
    </programlisting>
  </refsect1>

  <refsect1>
    <title>Description</title>
    <para>These functions are part of the matevfs module but are not associated with a specific class.</para>
  </refsect1>

  <refsect1>
    <title>Functions</title>

    <refsect2 id="function-matevfs--create">
      <title>matevfs.create</title>
      <programlisting>
        <methodsynopsis language="python">
	  <methodname>matevfs.create</methodname>
	  <methodparam><parameter role="keyword">uri</parameter></methodparam>
	  <methodparam><parameter role="keyword">open_mode</parameter><initializer>matevfs.OPEN_NONE</initializer></methodparam>
	  <methodparam><parameter role="keyword">exclusive</parameter><initializer>False</initializer></methodparam>
	  <methodparam><parameter role="keyword">perm</parameter><initializer>0666</initializer></methodparam>
	</methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
	  <term><parameter role="keyword">uri</parameter>:</term>
	  <listitem><simpara>The URI to create.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">open_mode</parameter>:</term>
	  <listitem><simpara>Mode to leave the file in after creation (or matevfs.OPEN_MODE_NONE to leave the file closed).</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">exclusive</parameter>:</term>
	  <listitem><simpara>Whether the file should be created in "exclusive" mode. i.e. if this flag is nonzero, The operation will fail if a file with the same name already exists.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">perm</parameter>:</term>
	  <listitem><simpara>Or'd set of <link linkend="matevfs-constants-file-permissions">file permissions flags</link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>:</term>
	  <listitem><simpara>A <link linkend="class-matevfs-handle">matevfs.Handle</link>.</simpara></listitem>
	</varlistentry>
      </variablelist>
      <para>Create and open <parameter role="keyword">uri</parameter> according to <parameter role="keyword">open_mode</parameter>.</para>
    </refsect2>

    <refsect2 id="function-matevfs--get_file_info">
      <title>matevfs.get_file_info</title>
      <programlisting>
        <methodsynopsis language="python">
	  <methodname>matevfs.get_file_info</methodname>
	  <methodparam><parameter role="keyword">uri</parameter></methodparam>
	  <methodparam><parameter role="keyword">options</parameter><initializer>matevfs.FILE_INFO_DEFAULT</initializer></methodparam>
	</methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
	  <term><parameter role="keyword">uri</parameter>:</term>
	  <listitem><simpara>The URI to retrieve information for.</simpara></listitem>
	</varlistentry>
        <varlistentry>
	  <term><parameter role="keyword">options</parameter>:</term>
	  <listitem><simpara>Or'd set of <link linkend="matevfs-constants-fileinfo-option">file info options</link>.</simpara></listitem>
	</varlistentry>
        <varlistentry>
	  <term><emphasis>Returns</emphasis>:</term>
	  <listitem><simpara>A <link linkend="class-matevfs-fileinfo">matevfs.FileInfo</link></simpara></listitem>
	</varlistentry>
      </variablelist>
      <para>Retrieve information about <parameter role="keyword">uri</parameter>.</para>
    </refsect2>

    <refsect2 id="function-matevfs--set_file_info">
      <title>matevfs.set_file_info</title>
      <programlisting>
        <methodsynopsis language="python">
          <methodname>matevfs.set_file_info</methodname>
	  <methodparam><parameter role="keyword">uri</parameter></methodparam>
	  <methodparam><parameter role="keyword">info</parameter></methodparam>
	  <methodparam><parameter role="keyword">mask</parameter><initializer>matevfs.SET_FILE_INFO_NONE</initializer></methodparam>
	</methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
	  <term><parameter role="keyword">uri</parameter>:</term>
	  <listitem><simpara>The URI to set information on.</simpara></listitem>
	</varlistentry>
        <varlistentry>
	  <term><parameter role="keyword">info</parameter>:</term>
	  <listitem><simpara><link linkend="class-matevfs-fileinfo">matevfs.FileInfo</link> with the information to set.</simpara></listitem>
	</varlistentry>
        <varlistentry>
	  <term><parameter role="keyword">mask</parameter>:</term>
	  <listitem><simpara>Or'd set of <link linkend="matevfs-constants-fileinfo-setmask">file info set flags</link>.</simpara></listitem>
	</varlistentry>
      </variablelist>
      <para>Set file information for <parameter role="keyword">uri</parameter>.  Only the information for which the corresponding bit in <parameter role="keyword">mask</parameter> is set is actually modified.</para>
    </refsect2>

    <refsect2 id="function-matevfs--truncate">
      <title>matevfs.truncate</title>
      <programlisting>
        <methodsynopsis language="python">
          <methodname>matevfs.truncate</methodname>
	  <methodparam><parameter role="keyword">uri</parameter></methodparam>
	  <methodparam><parameter role="keyword">length</parameter></methodparam>
	</methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
	  <term><parameter role="keyword">uri</parameter>:</term>
	  <listitem><simpara>The URI of the file to truncate.</simpara></listitem>
	</varlistentry>
        <varlistentry>
	  <term><parameter role="keyword">length</parameter>:</term>
	  <listitem><simpara>The length to truncate to.</simpara></listitem>
	</varlistentry>
      </variablelist>
      <para>Truncate a file to a specific length.</para>
    </refsect2>

    <refsect2 id="function-matevfs--make_directory">
      <title>matevfs.make_directory</title>
      <programlisting>
        <methodsynopsis language="python">
	  <methodname>matevfs.make_directory</methodname>
	  <methodparam><parameter role="keyword">uri</parameter></methodparam>
	  <methodparam><parameter role="keyword">perm</parameter></methodparam>
	</methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
	  <term><parameter role="keyword">uri</parameter>:</term>
	  <listitem><simpara>The URI of the directory to create.</simpara></listitem>
	</varlistentry>
        <varlistentry>
	  <term><parameter role="keyword">perm</parameter>:</term>
	  <listitem><simpara>Or'd set of <link linkend="matevfs-constants-file-permissions">file permissions flags</link>.</simpara></listitem>
	</varlistentry>
      </variablelist>
      <para>Create a directory with the given name and permissions.</para>
    </refsect2>

    <refsect2 id="function-matevfs--remove_directory">
      <title>matevfs.remove_directory</title>
      <programlisting>
        <methodsynopsis language="python">
	  <methodname>matevfs.remove_directory</methodname>
	  <methodparam><parameter role="keyword">uri</parameter></methodparam>
	</methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
	  <term><parameter role="keyword">uri</parameter>:</term>
	  <listitem><simpara>The URI of the directory to remove.</simpara></listitem>
	</varlistentry>
      </variablelist>
      <para>Remove a directory.</para>
    </refsect2>

    <refsect2 id="function-matevfs--unlink">
      <title>matevfs.unlink</title>
      <programlisting>
        <methodsynopsis language="python">
	  <methodname>matevfs.unlink</methodname>
	  <methodparam><parameter role="keyword">uri</parameter></methodparam>
	</methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
	  <term><parameter role="keyword">uri</parameter>:</term>
	  <listitem><simpara>The URI of the file to unlink</simpara></listitem>
	</varlistentry>
      </variablelist>
      <para>Unlink (delete) a URI.</para>
    </refsect2>

    <refsect2 id="function-matevfs--exists">
      <title>matevfs.exists</title>
      <programlisting>
        <methodsynopsis language="python">
	  <methodname>matevfs.exists</methodname>
	  <methodparam><parameter role="keyword">uri</parameter></methodparam>
	</methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
	  <term><parameter role="keyword">uri</parameter>:</term>
	  <listitem><simpara>The URI to check.</simpara></listitem>
	</varlistentry>
        <varlistentry>
	  <term><emphasis>Returns</emphasis>:</term>
	  <listitem><simpara>True if the URI exists.</simpara></listitem>
	</varlistentry>
      </variablelist>
      <para>Check if a given URI exists.</para>
    </refsect2>

    <refsect2 id="function-matevfs--format_file_size_for_display">
      <title>matevfs.format_file_size_for_display</title>
      <programlisting>
        <methodsynopsis language="python">
	  <methodname>matevfs.format_file_size_for_display</methodname>
	  <methodparam><parameter>size</parameter></methodparam>
	</methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
	  <term><parameter>size</parameter>:</term>
	  <listitem><simpara>The size of the file in bytes</simpara></listitem>
	</varlistentry>
        <varlistentry>
	  <term><emphasis>Returns</emphasis>:</term>
	  <listitem><simpara>A string with the printable size</simpara></listitem>
	</varlistentry>
      </variablelist>
      <para>Formats <parameter>size</parameter> in a way that is easy for the user to read.  Gives the size in bytes, kilobytes, megabytes or gigabytes, choosing whatever is appropriate.</para>
    </refsect2>

    <refsect2 id="function-matevfs--get_mime_type">
      <title>matevfs.get_mime_type</title>
      <programlisting>
        <methodsynopsis language="python">
	  <methodname>matevfs.get_mime_type</methodname>
	  <methodparam><parameter>uri</parameter></methodparam>
	</methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
	  <term><parameter>uri</parameter>:</term>
	  <listitem><simpara>The URI to retrieve the mime type for.</simpara></listitem>
	</varlistentry>
        <varlistentry>
	  <term><emphasis>Returns</emphasis>:</term>
	  <listitem><simpara>A string containing the mime type.</simpara></listitem>
	</varlistentry>
      </variablelist>
      <para>Determine the mime type of <parameter>uri</parameter>.  The mime type is determined in the same way as by <link linkend="function-matevfs--get_file_info">matevfs.get_file_info</link>.</para>
    </refsect2>

    <refsect2 id="function-matevfs--get_mime_type_for_data">
      <title>matevfs.get_mime_type_for_data</title>
      <programlisting>
      </programlisting>
      <variablelist>
        <varlistentry>
	  <term><parameter>data</parameter>:</term>
	  <listitem><simpara>A string containing the data.</simpara></listitem>
	</varlistentry>
        <varlistentry>
	  <term><emphasis>Returns</emphasis>:</term>
	  <listitem><simpara>A string containing the mime type.</simpara></listitem>
	</varlistentry>
      </variablelist>
      <para>Tries to guess the mime type of the data in <parameter>data</parameter> using magic patterns.</para>
    </refsect2>

    <refsect2 id="function-matevfs--mime_get_icon">
      <title>matevfs.mime_get_icon</title>
      <programlisting>
        <methodsynopsis language="python">
	  <methodname>matevfs.mime_get_icon</methodname>
	  <methodparam><parameter>mime_type</parameter></methodparam>
	</methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
	  <term><parameter>mime_type</parameter>:</term>
	  <listitem><simpara>A string with the mime type.</simpara></listitem>
	</varlistentry>
        <varlistentry>
	  <term><emphasis>Returns</emphasis>:</term>
	  <listitem><simpara>A string with an icon name.</simpara></listitem>
	</varlistentry>
      </variablelist>
      <para>Query the MIME database for an icon representing <parameter>mime_type</parameter>.  It usually returns a filename without path information, e.g. "i-chardev.png", and sometimes does not have an extension, e.g. "i-regular" if the icon is supposed to be image type agnostic between icon themes. Icons are generic and not theme specific. These will not necessarily match with the icons a user sees in Caja, you have been warned.</para>
    </refsect2>

    <refsect2 id="function-matevfs--mime_get_description">
      <title>matevfs.mime_get_description</title>
      <programlisting>
        <methodsynopsis language="python">
	  <methodname>matevfs.mime_get_description</methodname>
	  <methodparam><parameter>mime_type</parameter></methodparam>
	</methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
	  <term><parameter>mime_type</parameter>:</term>
	  <listitem><simpara>The mime type to query.</simpara></listitem>
	</varlistentry>
        <varlistentry>
	  <term><emphasis>Returns</emphasis>:</term>
	  <listitem><simpara>A description of the mime type.</simpara></listitem>
	</varlistentry>
      </variablelist>
      <para>Query the MIME database for a description of <parameter>mime_type</parameter>.</para>
    </refsect2>

    <refsect2 id="function-matevfs--mime_can_be_executable">
      <title>matevfs.mime_can_be_executable</title>
      <programlisting>
        <methodsynopsis language="python">
	  <methodname>matevfs.mime_can_be_executable</methodname>
	  <methodparam><parameter>mime_type</parameter></methodparam>
	</methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
	  <term><parameter>mime_type</parameter>:</term>
	  <listitem><simpara>The mime type to query.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>:</term>
	  <listitem><simpara>True if files of <parameter>mime_type</parameter> can be executable, False otherwise.</simpara></listitem>
	</varlistentry>
      </variablelist>
      <para>Check whether files of <parameter>mime_type</parameter> might conceivably be executable. Default for known types is False. Default for unknown types is True.</para>
    </refsect2>

    <refsect2 id="function-matevfs--monitor_add">
      <title>matevfs.monitor_add</title>
      <programlisting>
        <methodsynopsis language="python">
	  <methodname>matevfs.monitor_add</methodname>
	  <methodparam><parameter>text_uri</parameter></methodparam>
	  <methodparam><parameter>monitor_type</parameter></methodparam>
	  <methodparam><parameter>callback</parameter></methodparam>
	  <methodparam><parameter>extra</parameter><initializer>None</initializer></methodparam>
	</methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
	  <term><parameter>text_uri</parameter>:</term>
	  <listitem><simpara>String representing the URI to monitor.</simpara></listitem>
	</varlistentry>
        <varlistentry>
	  <term><parameter>monitor_type</parameter>:</term>
	  <listitem><simpara>A <link linkend="matevfs-constants-monitortype">monitor type</link> signifying the type of the URI.</simpara></listitem>
	</varlistentry>
        <varlistentry>
	  <term><parameter>callback</parameter>:</term>
	  <listitem><simpara>Function to call when the monitor is tripped.</simpara></listitem>
	</varlistentry>
        <varlistentry>
	  <term><parameter>user_data</parameter>:</term>
	  <listitem><simpara>Data to pass to <parameter>callback</parameter></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>:</term>
	  <listitem><simpara>An identifier representing this monitor.</simpara></listitem>
	</varlistentry>
      </variablelist>
      <para>Watch the file or directory at <parameter>text_uri</parameter> for changes (or the creation/deletion of the file) and call <parameter>callback</parameter> when there is a change. If a directory monitor is added, <parameter>callback</parameter> is notified when any file in the directory changes.</para>
    </refsect2>

    <refsect2 id="function-matevfs--monitor_cancel">
      <title>matevfs.monitor_cancel</title>
      <programlisting>
        <methodsynopsis language="python">
	  <methodname>matevfs.monitor_cancel</methodname>
	  <methodparam><parameter>id</parameter></methodparam>
	</methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
	  <term><parameter>id</parameter>:</term>
	  <listitem><simpara>Identifier which was given by <link linkend="function-matevfs--monitor_add">monitor_add</link></simpara></listitem>
	</varlistentry>
      </variablelist>
      <para>Cancel the monitor pointed to by <parameter>id</parameter></para>
    </refsect2>

    <refsect2 id="function-matevfs--read_entire_file">
      <title>matevfs.read_entire_file</title>
      <programlisting>
        <methodsynopsis language="python">
	  <methodname>matevfs.read_entire_file</methodname>
	  <methodparam><parameter>text_uri</parameter></methodparam>
	</methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
	  <term><parameter>text_uri</parameter>:</term>
	  <listitem><simpara>String containing the URI of the file to read.</simpara></listitem>
        </varlistentry>
        <varlistentry>
	  <term><emphasis>Returns</emphasis>:</term>
	  <listitem><simpara>String containing the data in the file.</simpara></listitem>
        </varlistentry>
      </variablelist>
      <para>Reads an entire file into memory for convenience. Beware of accidentally loading large files into memory with this function.</para>
    </refsect2>

    <refsect2 id="function-matevfs--mime_get_default_application">
      <title>matevfs.mime_get_default_application</title>
      <programlisting>
        <methodsynopsis language="python">
	  <methodname>matevfs.mime_get_default_application</methodname>
	  <methodparam><parameter>mime_type</parameter></methodparam>
	</methodsynopsis>
      </programlisting>
      <variablelist>
        <varlistentry>
	  <term><parameter>mime_type</parameter>:</term>
	  <listitem><simpara>Mime type to query.</simpara></listitem>
	</varlistentry>
        <varlistentry>
	  <term><emphasis>Returns</emphasis>:</term>
	  <listitem><simpara>Information about the application configured as the default handler for <parameter>mime_type</parameter>.</simpara></listitem>
	</varlistentry>
      </variablelist>
      <para>Query the MIME database for the default MateComponent component to be activated to view files of MIME type <parameter>mime_type</parameter></para>
    </refsect2>
  </refsect1>
</refentry>
