<doc>
  <legacy_id>1852</legacy_id>
  <name>fileType</name>
  <type>property</type>
  <syntax>
    <example>set the fileType to <i>creator</i> &amp; <i>type</i></example>
  </syntax>
  <library></library>
  <objects>
    <global/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Files, Folders, &amp; Resources</category>
    <category>Standalone Applications</category>
  </classification>
  <references>
    <property tag="filename">filename Property</property>
    <command tag="rename">rename Command</command>
    <property tag="stackFileType">stackFileType Property</property>
    <keyword tag="binfile">binfile Keyword</keyword>
    <keyword tag="file">file Keyword</keyword>
    <function tag="files">files Function</function>
    <command tag="open file">open file Command</command>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <ios/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary>Specifies the <glossary tag="creator signature">creator</glossary> and <glossary tag="type signature">file type</glossary> for any non-<object tag="stack">stack</object> <function tag="files">files</function> a <glossary tag="handler">handler</glossary> creates on a <glossary tag="Mac OS">Mac OS</glossary> or <glossary tag="OS X">OS X system</glossary>.</summary>
  <examples>
    <example>set the fileType to "ttxtTEXT" <code><i>-- text file owned by SimpleText app</i></code></example>
  </examples>
  <description>
    <p>Use the <b>fileType</b> <glossary tag="property">property</glossary> to ensure that <function tag="files">files</function> that a <glossary tag="standalone application">standalone application</glossary> creates are recognized by the operating system as belonging to the <glossary tag="standalone application">standalone</glossary>.</p><p/><p><b>Value:</b></p><p>The <b>fileType</b> is an eight-<keyword tag="character">character</keyword> <keyword tag="string">string</keyword>. The first four <keyword tag="characters">characters</keyword> are the <glossary tag="creator signature">creator signature</glossary>, and the last four are the <glossary tag="type signature">file type</glossary>.</p><p/><p><code/><img src="202653"/> <b>Important!</b><code/> The <glossary tag="type signature">file type</glossary> and <glossary tag="creator signature">creator signature</glossary> are <href tag="../glossary/casedashsensitive.xml">case-sensitive</href>.</p><p/><p><b>Comments:</b></p><p>When a file is saved on a Mac OS or OS X system, a 4-character file type and 4-character creator signature are saved with it. The creator signature specifies which application owns the file. The application determines the file format from the file type; the type is also used  to determine which applications (other than the owner) can work with the file.</p><p/><p>The <b>fileType</b> <glossary tag="property">property</glossary> is used to set the <glossary tag="type signature">file type</glossary> and <glossary tag="creator signature">creator</glossary> of <function tag="files">files</function> created by the <command tag="open file">open file</command> <glossary tag="command">command</glossary> and of <function tag="files">files</function> created putting data into a <keyword tag="file">file</keyword>, <keyword tag="binfile">binfile</keyword>, or <keyword tag="resfile">resfile</keyword> <keyword tag="URL">URL</keyword> that doesn't yet exist. (To specify the <glossary tag="type signature">file type</glossary> and <glossary tag="creator signature">creator</glossary> for <glossary tag="stack file">stack files</glossary> your application creates with the <command tag="save">save</command> <glossary tag="command">command</glossary>, use the <property tag="stackFileType">stackFileType</property> <glossary tag="property">property</glossary> instead.)</p><p/><p>This property has no effect on Unix and Windows systems.</p><p/><p><code/><img src="202653"/> <b>Important!</b><code/> To avoid conflicts with other applications, register any new <glossary tag="creator signature">creator signatures</glossary> with Apple Computer if you plan to distribute a <object tag="stack">stack</object> or <glossary tag="standalone application">standalone application</glossary> that uses this property. Apple maintains a registry of <glossary tag="creator signature">creator signatures</glossary> on its web site at &lt;<u>http://developer.apple.com/dev/cftype/</u>&gt;.</p>
  </description>
</doc>