<?xml version='1.0' encoding='ISO-8859-1' standalone='no'?>
<!DOCTYPE interface-description SYSTEM 'file:///usr/pkgsrc/lang/oo2c/work.macaroon/oo2c_32-2.0.11/rsrc/OOC/xml/interface-description.dtd'>
<interface-description name='Files' id=''>
  <oberon-doc>
    <summary>Note 1: This documentation describes only the additional features of files beyond the standard channels.</summary>
    <p pad-after='yes' no-indent='yes'>Note 1: This documentation describes only the additional features of files beyond the standard channels.  Please refer to <oberon-module href='Channel#'>Channel</oberon-module> for the semantics of all items that are inherited from Channel without modifications.</p>
    <p pad-after='yes' no-indent='no'>Note 2: Most Unix systems only allow a fixed number of files (and sockets) to be open simultaneously.  If this limit is reached, no new file can be opened or socket be created until an old file/socket is closed.  For any POSIX compliant system at least 16 open files are supported, most implementations provide a much larger number.</p>
  </oberon-doc>
  <import-decl name='Ch0' id='Ch0' export='no' module='Channel'/>
  <import-decl name='Ch' id='Ch' export='no' module='PosixFileDescr'/>
  <import-decl name='Time' id='Time' export='no' module='Time'/>
  <import-decl name='Termination' id='Termination' export='no' module='Termination'/>
  <import-decl name='CharClass' id='CharClass' export='no' module='CharClass'/>
  <import-decl name='LongStrings' id='LongStrings' export='no' module='LongStrings'/>
  <import-decl name='Msg' id='Msg' export='no' module='Msg'/>
  <type-decl name='Result' id='Result' export='yes'>
    <type>
      <type-name module='Ch' name='Result' href='PosixFileDescr#Result'/>
    </type>
  </type-decl>
  <const-decl name='noLength' id='noLength' export='yes' value='unknown'/>
  <const-decl name='noPosition' id='noPosition' export='yes' value='unknown'/>
  <const-decl name='done' id='done' export='yes' value='unknown'/>
  <const-decl name='invalidChannel' id='invalidChannel' export='yes' value='unknown'/>
  <const-decl name='writeError' id='writeError' export='yes' value='unknown'/>
  <const-decl name='noRoom' id='noRoom' export='yes' value='unknown'/>
  <const-decl name='outOfRange' id='outOfRange' export='yes' value='unknown'/>
  <const-decl name='readAfterEnd' id='readAfterEnd' export='yes' value='unknown'/>
  <const-decl name='channelClosed' id='channelClosed' export='yes' value='unknown'/>
  <const-decl name='readError' id='readError' export='yes' value='unknown'/>
  <const-decl name='invalidFormat' id='invalidFormat' export='yes' value='unknown'/>
  <const-decl name='noReadAccess' id='noReadAccess' export='yes' value='unknown'/>
  <const-decl name='noWriteAccess' id='noWriteAccess' export='yes' value='unknown'/>
  <const-decl name='closeError' id='closeError' export='yes' value='unknown'/>
  <const-decl name='noModTime' id='noModTime' export='yes' value='unknown'/>
  <const-decl name='noTmpName' id='noTmpName' export='yes' value='unknown'/>
  <const-decl name='accessDenied' id='accessDenied' export='yes' value='unknown'>
    <oberon-doc>
      <summary>Access to the channel was denied.</summary>
      <p pad-after='yes' no-indent='yes'>Access to the channel was denied.  For example, because a file's permissions don't permit the requested access method, or because the given URL isn't publically readable.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='isDirectory' id='isDirectory' export='yes' value='unknown'>
    <oberon-doc>
      <summary>The <samp>flags</samp> argument specified write access, and the file is a directory.</summary>
      <p pad-after='yes' no-indent='yes'>The <samp>flags</samp> argument specified write access, and the file is a directory.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='tooManyFiles' id='tooManyFiles' export='yes' value='unknown'>
    <oberon-doc>
      <summary>The process or the entire system has too many files open.</summary>
      <p pad-after='yes' no-indent='yes'>The process or the entire system has too many files open.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='noSuchFile' id='noSuchFile' export='yes' value='unknown'>
    <oberon-doc>
      <summary>The named file in a call to <oberon-proc href='#Old'>Old</oberon-proc> does not exist.</summary>
      <p pad-after='yes' no-indent='yes'>The named file in a call to <oberon-proc href='#Old'>Old</oberon-proc> does not exist.  Or the directory part of a file name passed to <oberon-proc href='#New'>New</oberon-proc> or <oberon-proc href='#Tmp'>Tmp</oberon-proc> does not exist.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='directoryFull' id='directoryFull' export='yes' value='unknown'>
    <oberon-doc>
      <summary>The directory or the file system that would contain the new file cannot be extended, either because there is no space left or the directory has a fixed upper limit.</summary>
      <p pad-after='yes' no-indent='yes'>The directory or the file system that would contain the new file cannot be extended, either because there is no space left or the directory has a fixed upper limit.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='readOnlyFileSystem' id='readOnlyFileSystem' export='yes' value='unknown'>
    <oberon-doc>
      <summary>The file resides on a read-only file system and it is attempted to create a new file, or to gain write access for an existing one.</summary>
      <p pad-after='yes' no-indent='yes'>The file resides on a read-only file system and it is attempted to create a new file, or to gain write access for an existing one.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='invalidTime' id='invalidTime' export='yes' value='unknown'>
    <oberon-doc>
      <summary>The time passed to procedure <oberon-proc href='#SetModTime'>SetModTime</oberon-proc> is no valid time stamp.</summary>
      <p pad-after='yes' no-indent='yes'>The time passed to procedure <oberon-proc href='#SetModTime'>SetModTime</oberon-proc> is no valid time stamp.  Either the millisecond part isn't valid, or the time value is too large or too small to be mapped to the time value of the underlying OS.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='notOwner' id='notOwner' export='yes' value='unknown'>
    <oberon-doc>
      <summary>Only the owner of a file can change its modification time.</summary>
      <p pad-after='yes' no-indent='yes'>Only the owner of a file can change its modification time.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='anonymousFile' id='anonymousFile' export='yes' value='unknown'>
    <oberon-doc>
      <summary>A file can only be registered if a file name was passed to the initial call to <oberon-proc href='#Tmp'>Tmp</oberon-proc>.</summary>
      <p pad-after='yes' no-indent='yes'>A file can only be registered if a file name was passed to the initial call to <oberon-proc href='#Tmp'>Tmp</oberon-proc>.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='dirWriteDenied' id='dirWriteDenied' export='yes' value='unknown'>
    <oberon-doc>
      <summary>You need to have write permission for the directory you want to add a new file to.</summary>
      <p pad-after='yes' no-indent='yes'>You need to have write permission for the directory you want to add a new file to.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='fileError' id='fileError' export='yes' value='unknown'>
    <oberon-doc>
      <summary>Unspecified error when opening/creating a file.</summary>
      <p pad-after='yes' no-indent='yes'>Unspecified error when opening/creating a file.  This usually means that this module doesn't know how to interpret the error code delivered by the OS.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='nameTooLong' id='nameTooLong' export='yes' value='unknown'>
    <oberon-doc>
      <summary>Either the total length of the file name or of an individual file name component is too large.</summary>
      <p pad-after='yes' no-indent='yes'>Either the total length of the file name or of an individual file name component is too large.  The operating system can impose such limits (see PATH_MAX and NAME_MAX in <file>/usr/include/limits.h</file>), or the file system itself restricts the format of names on it.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='notDirectory' id='notDirectory' export='yes' value='unknown'>
    <oberon-doc>
      <summary>A file that is referenced as a directory component of the file name exists, but is not a directory.</summary>
      <p pad-after='yes' no-indent='yes'>A file that is referenced as a directory component of the file name exists, but is not a directory.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='linkLoop' id='linkLoop' export='yes' value='unknown'>
    <oberon-doc>
      <summary>Too many symbolic links were resolved while trying to look up the file name.</summary>
      <p pad-after='yes' no-indent='yes'>Too many symbolic links were resolved while trying to look up the file name.  The operating system has an arbitrary limit on the number of symbolic links that may be resolved in looking up a single file name, as a primitive way to detect loops.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='read' id='read' export='yes' value='unknown'>
    <oberon-doc>
      <summary>If the file cannot be opened for reading access, then it isn't opened at all.</summary>
      <p pad-after='yes' no-indent='yes'>If the file cannot be opened for reading access, then it isn't opened at all.  In this case the error code is set to <oberon-const href='#noReadAccess'>noReadAccess</oberon-const>.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='write' id='write' export='yes' value='unknown'>
    <oberon-doc>
      <summary>If the file cannot be opened for writing access, then it isn't opened at all.</summary>
      <p pad-after='yes' no-indent='yes'>If the file cannot be opened for writing access, then it isn't opened at all.  In this case the error code is set to <oberon-const href='#noWriteAccess'>noWriteAccess</oberon-const>.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='tryRead' id='tryRead' export='yes' value='unknown'>
    <oberon-doc>
      <summary>Try to open this file for reading access.</summary>
      <p pad-after='yes' no-indent='yes'>Try to open this file for reading access.  If the file permissions don't permit reading the file is opened nevertheless, but the file descriptor's attribute <oberon-field href='Channel#ChannelDesc.readable'>File.readable</oberon-field> is set to <code>FALSE</code>.</p>
    </oberon-doc>
  </const-decl>
  <const-decl name='tryWrite' id='tryWrite' export='yes' value='unknown'>
    <oberon-doc>
      <summary>Try to open this file for writing access.</summary>
      <p pad-after='yes' no-indent='yes'>Try to open this file for writing access.  If the file permissions don't permit writing the file is opened nevertheless, but the file descriptor's attribute <oberon-field href='Channel#ChannelDesc.writable'>File.writable</oberon-field> is set to <code>FALSE</code>.</p>
    </oberon-doc>
  </const-decl>
  <procedure name='SetModTime' id='SetModTime' export='yes'>
    <oberon-doc>
      <summary>Sets the modification time of the given file to <oberon-param href='#SetModTime.mtime'>mtime</oberon-param>.</summary>
      <p pad-after='yes' no-indent='yes'>Sets the modification time of the given file to <oberon-param href='#SetModTime.mtime'>mtime</oberon-param>.  On success <oberon-param href='#SetModTime.res'>res</oberon-param> will contain <oberon-const href='#done'>done</oberon-const>, otherwise an error code that indicates the problem.  Note that under Unix this procedure will also change the access time to the value of <oberon-param href='#SetModTime.mtime'>mtime</oberon-param>.</p>
    </oberon-doc>
    <formal-parameters>
      <parameter-decl name='file' id='SetModTime.file' export='no' variable-parameter='no'>
        <type>
          <array>
            <element-type>
              <type-name module='#predef' name='CHAR'/>
            </element-type>
          </array>
        </type>
      </parameter-decl>
      <parameter-decl name='mtime' id='SetModTime.mtime' export='no' variable-parameter='no'>
        <type>
          <type-name module='Time' name='TimeStamp' href='Time#TimeStamp'/>
        </type>
      </parameter-decl>
      <parameter-decl name='res' id='SetModTime.res' export='no' variable-parameter='yes'>
        <type>
          <type-name name='Result' href='#Result'/>
        </type>
      </parameter-decl>
    </formal-parameters>
  </procedure>
  <procedure name='GetModTime' id='GetModTime' export='yes'>
    <oberon-doc>
      <summary>Gets the modification time of the given file to <oberon-param href='#GetModTime.mtime'>mtime</oberon-param>.</summary>
      <p pad-after='yes' no-indent='yes'>Gets the modification time of the given file to <oberon-param href='#GetModTime.mtime'>mtime</oberon-param>.  On success <oberon-param href='#GetModTime.res'>res</oberon-param> will contain <oberon-const href='#done'>done</oberon-const>, otherwise an error code indicating the problem.</p>
    </oberon-doc>
    <formal-parameters>
      <parameter-decl name='file' id='GetModTime.file' export='no' variable-parameter='no'>
        <type>
          <array>
            <element-type>
              <type-name module='#predef' name='CHAR'/>
            </element-type>
          </array>
        </type>
      </parameter-decl>
      <parameter-decl name='mtime' id='GetModTime.mtime' export='no' variable-parameter='yes'>
        <type>
          <type-name module='Time' name='TimeStamp' href='Time#TimeStamp'/>
        </type>
      </parameter-decl>
      <parameter-decl name='res' id='GetModTime.res' export='no' variable-parameter='yes'>
        <type>
          <type-name name='Result' href='#Result'/>
        </type>
      </parameter-decl>
    </formal-parameters>
  </procedure>
  <procedure name='Exists' id='Exists' export='yes'>
    <oberon-doc>
      <summary>Returns <code>TRUE</code> if a file <oberon-param href='#Exists.file'>file</oberon-param> exists, and <code>FALSE</code> otherwise.</summary>
      <p pad-after='yes' no-indent='yes'>Returns <code>TRUE</code> if a file <oberon-param href='#Exists.file'>file</oberon-param> exists, and <code>FALSE</code> otherwise.</p>
    </oberon-doc>
    <formal-parameters>
      <parameter-decl name='file' id='Exists.file' export='no' variable-parameter='no'>
        <type>
          <array>
            <element-type>
              <type-name module='#predef' name='CHAR'/>
            </element-type>
          </array>
        </type>
      </parameter-decl>
      <result-type>
        <type-name module='#predef' name='BOOLEAN'/>
      </result-type>
    </formal-parameters>
  </procedure>
  <import-decl name='-RT0' id='-RT0' export='no' module='RT0'/>
  <import-decl name='-Object' id='-Object' export='no' module='Object'/>
  <import-decl name='-Exception' id='-Exception' export='no' module='Exception'/>
  <class name='File'>
    <type-decl name='File' id='File' export='yes'>
      <type>
        <pointer>
          <pointer-base>
            <type-name name='FileDesc' href='#FileDesc'/>
          </pointer-base>
        </pointer>
      </type>
    </type-decl>
    <type-decl name='FileDesc' id='FileDesc' export='yes'>
      <type>
        <record/>
      </type>
    </type-decl>
    <procedure name='Register' id='FileDesc.Register' export='yes'>
      <oberon-doc>
        <summary>Registers the file <oberon-param href='#FileDesc.Register.f'>f</oberon-param> in the directory structure if it has been created with the <oberon-proc href='#Tmp'>Tmp</oberon-proc> procedure below.</summary>
        <p pad-after='yes' no-indent='yes'>Registers the file <oberon-param href='#FileDesc.Register.f'>f</oberon-param> in the directory structure if it has been created with the <oberon-proc href='#Tmp'>Tmp</oberon-proc> procedure below.  Registration happens atomically.  That is, it is guaranteed that any previously existing file is replaced by the newly registered one without any "in between" state.  If the operation is interrupted, then either the old file still exists on the file system, or it has been replaced completely by the new one.</p>
        <p pad-after='yes' no-indent='no'>Calling <oberon-proc href='#Tmp'>Tmp</oberon-proc> and <oberon-proc href='#FileDesc.Register'>File.Register</oberon-proc> successively has the same effect as calling <oberon-proc href='#New'>New</oberon-proc>.  Calling this procedure has no effect if the file <oberon-param href='#FileDesc.Register.f'>f</oberon-param> has been created with <oberon-proc href='#New'>New</oberon-proc> or has been registered previously.  Registration fails with an <oberon-const href='#anonymousFile'>anonymousFile</oberon-const> error if it was created by calling <oberon-proc href='#Tmp'>Tmp</oberon-proc> with an empty file name, and with a <oberon-const href='#channelClosed'>channelClosed</oberon-const> error if <oberon-param href='#FileDesc.Register.f'>f</oberon-param> is closed.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='f' id='FileDesc.Register.f' export='no' variable-parameter='no'>
          <type>
            <type-name name='File' href='#File'/>
          </type>
        </receiver-decl>
      </formal-parameters>
    </procedure>
    <procedure name='NewReader' id='FileDesc.NewReader' export='yes'>
      <oberon-doc>
        <summary>Attaches a new reader to the file <oberon-param href='#FileDesc.NewReader.f'>f</oberon-param>.</summary>
        <p pad-after='yes' no-indent='yes'>Attaches a new reader to the file <oberon-param href='#FileDesc.NewReader.f'>f</oberon-param>.  It is placed at the very start of the file, and its <oberon-field href='Channel#ReaderDesc.res'>Reader.res</oberon-field> field is initialized to <oberon-const href='#done'>done</oberon-const>.  <oberon-field href='Channel#ChannelDesc.res'>f.res</oberon-field> is set to <oberon-const href='#done'>done</oberon-const> on success and the new reader is returned.  Otherwise result is <code>NIL</code> and <oberon-field href='Channel#ChannelDesc.res'>f.res</oberon-field> is changed to indicate the error cause.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='f' id='FileDesc.NewReader.f' export='no' variable-parameter='no'>
          <type>
            <type-name name='File' href='#File'/>
          </type>
        </receiver-decl>
        <result-type>
          <type-name name='Reader' href='#Reader'/>
        </result-type>
      </formal-parameters>
      <redefined-method module='PosixFileDescr' name='NewReader' class='Channel' href='PosixFileDescr#ChannelDesc.NewReader'/>
      <redefined-method module='Channel' name='NewReader' class='Channel' href='Channel#ChannelDesc.NewReader'/>
    </procedure>
    <procedure name='NewWriter' id='FileDesc.NewWriter' export='yes'>
      <oberon-doc>
        <summary>Attaches a new writer to the file <oberon-param href='#FileDesc.NewWriter.f'>f</oberon-param>.</summary>
        <p pad-after='yes' no-indent='yes'>Attaches a new writer to the file <oberon-param href='#FileDesc.NewWriter.f'>f</oberon-param>.  It is placed at the very start of the file, and its <oberon-field href='Channel#WriterDesc.res'>Writer.res</oberon-field> field is initialized to <oberon-const href='#done'>done</oberon-const>.  <oberon-field href='Channel#ChannelDesc.res'>f.res</oberon-field> is set to <oberon-const href='#done'>done</oberon-const> on success and the new writer is returned.  Otherwise result is <code>NIL</code> and <oberon-field href='Channel#ChannelDesc.res'>f.res</oberon-field> is changed to indicate the error cause.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='f' id='FileDesc.NewWriter.f' export='no' variable-parameter='no'>
          <type>
            <type-name name='File' href='#File'/>
          </type>
        </receiver-decl>
        <result-type>
          <type-name name='Writer' href='#Writer'/>
        </result-type>
      </formal-parameters>
      <redefined-method module='PosixFileDescr' name='NewWriter' class='Channel' href='PosixFileDescr#ChannelDesc.NewWriter'/>
      <redefined-method module='Channel' name='NewWriter' class='Channel' href='Channel#ChannelDesc.NewWriter'/>
    </procedure>
    <procedure name='Close' id='FileDesc.Close' export='yes'>
      <oberon-doc>
        <summary>Flushes all buffers associated with <oberon-param href='#FileDesc.Close.f'>f</oberon-param>, closes the file, and frees all system resources allocated to it.</summary>
        <p pad-after='yes' no-indent='yes'>Flushes all buffers associated with <oberon-param href='#FileDesc.Close.f'>f</oberon-param>, closes the file, and frees all system resources allocated to it.  This invalidates all riders attached to <oberon-param href='#FileDesc.Close.f'>f</oberon-param>, they can't be used further.  On success, that is, if all read and write operations (including flush) completed successfully, <oberon-field href='Channel#ChannelDesc.res'>f.res</oberon-field> is set to <oberon-const href='#done'>done</oberon-const>.</p>
        <p pad-after='yes' no-indent='no'>An opened file can only be closed once, successive calls of <oberon-proc href='#FileDesc.Close'>File.Close</oberon-proc> are undefined.  Note that unlike the Oberon System all opened files have to be closed explicitly.  Otherwise resources allocated to them will remain blocked.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='f' id='FileDesc.Close.f' export='no' variable-parameter='no'>
          <type>
            <type-name name='File' href='#File'/>
          </type>
        </receiver-decl>
      </formal-parameters>
      <redefined-method module='PosixFileDescr' name='Close' class='Channel' href='PosixFileDescr#ChannelDesc.Close'/>
      <redefined-method module='Channel' name='Close' class='Channel' href='Channel#ChannelDesc.Close'/>
    </procedure>
    <procedure name='New' id='New' export='yes'>
      <oberon-doc>
        <summary>Creates a new file under the given name.</summary>
        <p pad-after='yes' no-indent='yes'>Creates a new file under the given name.  On success the new file handle is returned and <oberon-param href='#New.res'>res</oberon-param> is set to <oberon-const href='#done'>done</oberon-const>.  Otherwise result is <code>NIL</code> and <oberon-param href='#New.res'>res</oberon-param> and will indicate the problem.</p>
        <p pad-after='yes' no-indent='no'>Note that in terms of the Oberon System this procedure combines the procedures <samp>New</samp> and <samp>Register</samp>.</p>
      </oberon-doc>
      <formal-parameters>
        <parameter-decl name='file' id='New.file' export='no' variable-parameter='no'>
          <type>
            <array>
              <element-type>
                <type-name module='#predef' name='CHAR'/>
              </element-type>
            </array>
          </type>
        </parameter-decl>
        <parameter-decl name='flags' id='New.flags' export='no' variable-parameter='no'>
          <type>
            <type-name module='#predef' name='SET'/>
          </type>
        </parameter-decl>
        <parameter-decl name='res' id='New.res' export='no' variable-parameter='yes'>
          <type>
            <type-name name='Result' href='#Result'/>
          </type>
        </parameter-decl>
        <result-type>
          <type-name name='File' href='#File'/>
        </result-type>
      </formal-parameters>
    </procedure>
    <procedure name='Old' id='Old' export='yes'>
      <oberon-doc>
        <summary>Opens an existing file.</summary>
        <p pad-after='yes' no-indent='yes'>Opens an existing file.  On success the new file handle is returned and <oberon-param href='#Old.res'>res</oberon-param> is set to <oberon-const href='#done'>done</oberon-const>.  Otherwise result is <code>NIL</code> and <oberon-param href='#Old.res'>res</oberon-param> will indicate the problem.</p>
      </oberon-doc>
      <formal-parameters>
        <parameter-decl name='file' id='Old.file' export='no' variable-parameter='no'>
          <type>
            <array>
              <element-type>
                <type-name module='#predef' name='CHAR'/>
              </element-type>
            </array>
          </type>
        </parameter-decl>
        <parameter-decl name='flags' id='Old.flags' export='no' variable-parameter='no'>
          <type>
            <type-name module='#predef' name='SET'/>
          </type>
        </parameter-decl>
        <parameter-decl name='res' id='Old.res' export='no' variable-parameter='yes'>
          <type>
            <type-name name='Result' href='#Result'/>
          </type>
        </parameter-decl>
        <result-type>
          <type-name name='File' href='#File'/>
        </result-type>
      </formal-parameters>
    </procedure>
    <procedure name='Tmp' id='Tmp' export='yes'>
      <oberon-doc>
        <summary>Creates a temporary file that can be registered later on.</summary>
        <p pad-after='yes' no-indent='yes'>Creates a temporary file that can be registered later on.  On success the new file handle is returned and <oberon-param href='#Tmp.res'>res</oberon-param> is set to <oberon-const href='#done'>done</oberon-const>.  Otherwise result is <code>NIL</code> and <oberon-param href='#Tmp.res'>res</oberon-param> will indicate the problem.</p>
        <p pad-after='yes' no-indent='no'>Temporary files are created with an empty permission list, the permissions are extended upon registration.  The files are deleted if they haven't been registered and are closed or the program terminates.</p>
        <p pad-after='yes' no-indent='no'>An unique temporary file name is created if the given file name is the empty string.  Such a file can't be registered later.  Note that some systems are said to have a very low limit for the number of temporary file names.  The limit is never less than 25.  To be on the safe side you should never have more than 25 anonymous temporary files open simultaneously, or check that the <samp>TMP_MAX</samp> macro in <file>/usr/include/stdio.h</file> is large enough for your purposes.</p>
        <p pad-after='yes' no-indent='no'>With <code>oo2c</code> if <oberon-param href='#Tmp.file'>file</oberon-param> isn't empty, the new name is derived from the old one by appending "^", "^1", "^2", etc. in turn, until a file name is found that doesn't exist already.  If such call to <oberon-proc href='#Tmp'>Tmp</oberon-proc> returns <oberon-const href='#nameTooLong'>nameTooLong</oberon-const>, then this refers to the constructed temporary name, not the one in <oberon-param href='#Tmp.file'>file</oberon-param>.  This function corresponds to Oberon System's <samp>New</samp>.</p>
      </oberon-doc>
      <formal-parameters>
        <parameter-decl name='file' id='Tmp.file' export='no' variable-parameter='no'>
          <type>
            <array>
              <element-type>
                <type-name module='#predef' name='CHAR'/>
              </element-type>
            </array>
          </type>
        </parameter-decl>
        <parameter-decl name='flags' id='Tmp.flags' export='no' variable-parameter='no'>
          <type>
            <type-name module='#predef' name='SET'/>
          </type>
        </parameter-decl>
        <parameter-decl name='res' id='Tmp.res' export='no' variable-parameter='yes'>
          <type>
            <type-name name='Result' href='#Result'/>
          </type>
        </parameter-decl>
        <result-type>
          <type-name name='File' href='#File'/>
        </result-type>
      </formal-parameters>
    </procedure>
    <base-class module='PosixFileDescr' class='Channel' href='PosixFileDescr#Channel'>
      <inherited-method module='PosixFileDescr' name='Close' class='Channel' href='PosixFileDescr#ChannelDesc.Close'/>
      <inherited-method module='PosixFileDescr' name='Flush' class='Channel' href='PosixFileDescr#ChannelDesc.Flush'/>
      <inherited-method module='PosixFileDescr' name='GetModTime' class='Channel' href='PosixFileDescr#ChannelDesc.GetModTime'/>
      <inherited-method module='PosixFileDescr' name='Length' class='Channel' href='PosixFileDescr#ChannelDesc.Length'/>
      <inherited-method module='PosixFileDescr' name='NewReader' class='Channel' href='PosixFileDescr#ChannelDesc.NewReader'/>
      <inherited-method module='PosixFileDescr' name='NewWriter' class='Channel' href='PosixFileDescr#ChannelDesc.NewWriter'/>
      <inherited-field module='PosixFileDescr' name='fd' class='Channel' href='PosixFileDescr#ChannelDesc.fd'/>
      <base-class module='Channel' class='Channel' href='Channel#Channel'>
        <inherited-method module='Channel' name='ClearError' class='Channel' href='Channel#ChannelDesc.ClearError'/>
        <inherited-field module='Channel' name='open' class='Channel' href='Channel#ChannelDesc.open'/>
        <inherited-field module='Channel' name='readable' class='Channel' href='Channel#ChannelDesc.readable'/>
        <inherited-field module='Channel' name='res' class='Channel' href='Channel#ChannelDesc.res'/>
        <inherited-field module='Channel' name='writable' class='Channel' href='Channel#ChannelDesc.writable'/>
      </base-class>
    </base-class>
  </class>
  <class name='Reader'>
    <type-decl name='Reader' id='Reader' export='yes'>
      <type>
        <pointer>
          <pointer-base>
            <type-name name='ReaderDesc' href='#ReaderDesc'/>
          </pointer-base>
        </pointer>
      </type>
    </type-decl>
    <type-decl name='ReaderDesc' id='ReaderDesc' export='yes'>
      <type>
        <record/>
      </type>
    </type-decl>
    <base-class module='PosixFileDescr' class='Reader' href='PosixFileDescr#Reader'>
      <inherited-method module='PosixFileDescr' name='Available' class='Reader' href='PosixFileDescr#ReaderDesc.Available'/>
      <inherited-method module='PosixFileDescr' name='Pos' class='Reader' href='PosixFileDescr#ReaderDesc.Pos'/>
      <inherited-method module='PosixFileDescr' name='ReadByte' class='Reader' href='PosixFileDescr#ReaderDesc.ReadByte'/>
      <inherited-method module='PosixFileDescr' name='ReadBytes' class='Reader' href='PosixFileDescr#ReaderDesc.ReadBytes'/>
      <inherited-method module='PosixFileDescr' name='SetPos' class='Reader' href='PosixFileDescr#ReaderDesc.SetPos'/>
      <base-class module='Channel' class='Reader' href='Channel#Reader'>
        <inherited-method module='Channel' name='ClearError' class='Reader' href='Channel#ReaderDesc.ClearError'/>
        <inherited-field module='Channel' name='base' class='Reader' href='Channel#ReaderDesc.base'/>
        <inherited-field module='Channel' name='bytesRead' class='Reader' href='Channel#ReaderDesc.bytesRead'/>
        <inherited-field module='Channel' name='positionable' class='Reader' href='Channel#ReaderDesc.positionable'/>
        <inherited-field module='Channel' name='res' class='Reader' href='Channel#ReaderDesc.res'/>
      </base-class>
    </base-class>
  </class>
  <class name='Writer'>
    <type-decl name='Writer' id='Writer' export='yes'>
      <type>
        <pointer>
          <pointer-base>
            <type-name name='WriterDesc' href='#WriterDesc'/>
          </pointer-base>
        </pointer>
      </type>
    </type-decl>
    <type-decl name='WriterDesc' id='WriterDesc' export='yes'>
      <type>
        <record/>
      </type>
    </type-decl>
    <procedure name='Truncate' id='WriterDesc.Truncate' export='yes'>
      <oberon-doc>
        <summary>Causes the file associated with <oberon-param href='#WriterDesc.Truncate.w'>w</oberon-param> to have the specified length.</summary>
        <p pad-after='yes' no-indent='yes'>Causes the file associated with <oberon-param href='#WriterDesc.Truncate.w'>w</oberon-param> to have the specified length.  If the file was previously larger than <oberon-param href='#WriterDesc.Truncate.newLength'>newLength</oberon-param>, then the extra data is lost.  If it was previously shorter, bytes between the old and new lengths are read as zeros.  The writer's position is not modified.  Note: On systems that do not support shortening files directly it is implemented as a partial file copy.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='w' id='WriterDesc.Truncate.w' export='no' variable-parameter='no'>
          <type>
            <type-name name='Writer' href='#Writer'/>
          </type>
        </receiver-decl>
        <parameter-decl name='newLength' id='WriterDesc.Truncate.newLength' export='no' variable-parameter='no'>
          <type>
            <type-name module='#predef' name='LONGINT'/>
          </type>
        </parameter-decl>
      </formal-parameters>
    </procedure>
    <base-class module='PosixFileDescr' class='Writer' href='PosixFileDescr#Writer'>
      <inherited-method module='PosixFileDescr' name='Pos' class='Writer' href='PosixFileDescr#WriterDesc.Pos'/>
      <inherited-method module='PosixFileDescr' name='SetPos' class='Writer' href='PosixFileDescr#WriterDesc.SetPos'/>
      <inherited-method module='PosixFileDescr' name='WriteByte' class='Writer' href='PosixFileDescr#WriterDesc.WriteByte'/>
      <inherited-method module='PosixFileDescr' name='WriteBytes' class='Writer' href='PosixFileDescr#WriterDesc.WriteBytes'/>
      <base-class module='Channel' class='Writer' href='Channel#Writer'>
        <inherited-method module='Channel' name='ClearError' class='Writer' href='Channel#WriterDesc.ClearError'/>
        <inherited-field module='Channel' name='base' class='Writer' href='Channel#WriterDesc.base'/>
        <inherited-field module='Channel' name='bytesWritten' class='Writer' href='Channel#WriterDesc.bytesWritten'/>
        <inherited-field module='Channel' name='positionable' class='Writer' href='Channel#WriterDesc.positionable'/>
        <inherited-field module='Channel' name='res' class='Writer' href='Channel#WriterDesc.res'/>
      </base-class>
    </base-class>
  </class>
  <class name='ErrorContext'>
    <type-decl name='ErrorContext' id='ErrorContext' export='yes'>
      <type>
        <pointer>
          <pointer-base>
            <type-name name='ErrorContextDesc' href='#ErrorContextDesc'/>
          </pointer-base>
        </pointer>
      </type>
    </type-decl>
    <type-decl name='ErrorContextDesc' id='ErrorContextDesc' export='yes'>
      <oberon-doc>
        <summary>This record is exported, so that extensions of <oberon-type href='#File'>File</oberon-type> can access the error descriptions by extending <oberon-type href='#ErrorContextDesc'>ErrorContextDesc</oberon-type>.</summary>
        <p pad-after='yes' no-indent='yes'>This record is exported, so that extensions of <oberon-type href='#File'>File</oberon-type> can access the error descriptions by extending <oberon-type href='#ErrorContextDesc'>ErrorContextDesc</oberon-type>.</p>
      </oberon-doc>
      <type>
        <record/>
      </type>
    </type-decl>
    <procedure name='GetTemplate' id='ErrorContextDesc.GetTemplate' export='yes'>
      <doc-inherited-from module='Channel' name='GetTemplate' class='ErrorContext' href='Channel#ErrorContextDesc.GetTemplate'/>
      <oberon-doc>
        <summary>Translates this module's error codes into strings.</summary>
        <p pad-after='yes' no-indent='yes'>Translates this module's error codes into strings.  The string usually contains a short error description, possibly followed by some attributes to provide additional information for the problem.</p>
        <p pad-after='yes' no-indent='no'>The method should not be called directly by the user.  It is invoked by <samp>res.GetText()</samp> or <samp>res.GetLText</samp>.</p>
      </oberon-doc>
      <formal-parameters>
        <receiver-decl name='context' id='ErrorContextDesc.GetTemplate.context' export='no' variable-parameter='no'>
          <type>
            <type-name name='ErrorContext' href='#ErrorContext'/>
          </type>
        </receiver-decl>
        <parameter-decl name='msg' id='ErrorContextDesc.GetTemplate.msg' export='no' variable-parameter='no'>
          <type>
            <type-name module='Msg' name='Msg' href='Msg#Msg'/>
          </type>
        </parameter-decl>
        <parameter-decl name='templ' id='ErrorContextDesc.GetTemplate.templ' export='no' variable-parameter='yes'>
          <type>
            <type-name module='Msg' name='LString' href='Msg#LString'/>
          </type>
        </parameter-decl>
      </formal-parameters>
      <redefined-method module='PosixFileDescr' name='GetTemplate' class='ErrorContext' href='PosixFileDescr#ErrorContextDesc.GetTemplate'/>
      <redefined-method module='Channel' name='GetTemplate' class='ErrorContext' href='Channel#ErrorContextDesc.GetTemplate'/>
      <redefined-method module='Msg' name='GetTemplate' class='Context' href='Msg#ContextDesc.GetTemplate'/>
    </procedure>
    <base-class module='PosixFileDescr' class='ErrorContext' href='PosixFileDescr#ErrorContext'>
      <inherited-method module='PosixFileDescr' name='GetTemplate' class='ErrorContext' href='PosixFileDescr#ErrorContextDesc.GetTemplate'/>
      <base-class module='Channel' class='ErrorContext' href='Channel#ErrorContext'>
        <base-class module='Msg' class='Context' href='Msg#Context'>
          <inherited-field module='Msg' name='id' class='Context' href='Msg#ContextDesc.id'/>
        </base-class>
      </base-class>
    </base-class>
  </class>
  <module-ref name='Msg'>
    <ref-target type='html' relative-uri='Msg.html'/>
  </module-ref>
  <module-ref name='Channel'>
    <ref-target type='html' relative-uri='Channel.html'/>
  </module-ref>
  <module-ref name='PosixFileDescr'>
    <ref-target type='html' relative-uri='PosixFileDescr.html'/>
  </module-ref>
  <module-ref name='Time'>
    <ref-target type='html' relative-uri='Time.html'/>
  </module-ref>
</interface-description>
