<ppdoc>
<copyright>
Copyright (c) 2001 by Addison Wesley Longman, Inc. This material may
be distributed only subject to the terms and conditions set forth in
the Open Publication License, v1.0 or later (the latest version is
presently available at http://www.opencontent.org/openpub/).
<p/>
Distribution of substantively modified versions of this document is
prohibited without the explicit permission of the copyright holder.
<p/>
Distribution of the work or derivative of the work in any standard
(paper) book form is prohibited unless prior permission is obtained
from the copyright holder.
</copyright>
<class name="File::Stat" super="Object" type="class" ref="xref-000001">  
<p/>
  Objects of class <classname>File::Stat</classname> encapsulate common status information for
  <classname>File</classname> objects.  The information is recorded at the
  moment the <classname>File::Stat</classname> object is created; changes made to the file
  after that point will not be reflected.
  <classname>File::Stat</classname> objects are returned by <cim><file>io</file><front>IO</front><back>stat</back><mref>stat</mref></cim>, 
  <ccm><file>file</file><front>File</front><back>stat</back><mref>stat</mref></ccm>, <cim><file>file</file><front>File</front><back>lstat</back><mref>lstat</mref></cim>, and <ccm><file>file</file><front>File</front><back>lstat</back><mref>lstat</mref></ccm>.
  Many of these methods return platform-specific
  values, and not all values are meaningful on all systems.
  See also <mim><file>kernel</file><front>Kernel</front><back>test</back><mref>test</mref></mim> on page 425.
  <mixins>
    <mixin name="Comparable">
   &lt;, &lt;=, ==, &gt;=, &gt;, between?</mixin>
  </mixins>
<p/>
  <methods type="instance">
<p/>
        <method name="&lt;=&gt;" ref="_lt_eq_lt">
      <callseq>
        <obj>statfile</obj> &lt;=&gt; <obj>anOtherStat</obj>
        <returns>-1, 0, 1</returns>
      </callseq>
      <desc>
<p/>
       Compares <classname>File::Stat</classname> objects by comparing their respective
       modification times.
<p/>
<codefragment>
<fullcode><![CDATA[        f1 = File.new("f1", "w")
        sleep 1 #!sh!
        f2 = File.new("f2", "w")
        f1.stat <=> f2.stat
]]></fullcode><rubycode>
<tr>
<td colspan="3"><tt>f1<nbsp/>=<nbsp/>File.new("f1",<nbsp/>"w")</tt></td>
</tr>
<tr>
<td colspan="3"><tt>sleep<nbsp/>1</tt></td>
</tr>
<tr>
<td colspan="3"><tt>f2<nbsp/>=<nbsp/>File.new("f2",<nbsp/>"w")</tt></td>
</tr>
<tr>
  <td><tt>f1.stat<nbsp/>&lt;=&gt;<nbsp/>f2.stat</tt></td>
  <td>&#187;</td>
  <td><tt>-1</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="atime" ref="atime">
      <callseq>
        <obj>statfile</obj>.atime
        <returns><obj>aTime</obj></returns>
      </callseq>
      <desc>
<p/>
      Returns the last access time for this file 
      as an object of class <classname>Time</classname>.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").atime
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").atime</tt></td>
  <td>&#187;</td>
  <td><tt>Wed<nbsp/>Dec<nbsp/>31<nbsp/>18:00:00<nbsp/>CST<nbsp/>1969</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="blksize" ref="blksize">
      <callseq>
        <obj>statfile</obj>.blksize
        <returns><obj>anInteger</obj></returns>
      </callseq>
      <desc>
<p/>
      Returns the native file system's block size.
      Will return 0 on platforms that don't support this information.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").blksize
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").blksize</tt></td>
  <td>&#187;</td>
  <td><tt>4096</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="blockdev?" ref="blockdev_qm">
      <callseq>
        <obj>statfile</obj>.blockdev?
        <returns><const>true</const> or <const>false</const></returns>
      </callseq>
      <desc>
<p/>
      Returns <const>true</const> if the file is a block device, <const>false</const>
      if it isn't or 
      if the operating system doesn't support this feature.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").blockdev?
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").blockdev?</tt></td>
  <td>&#187;</td>
  <td><tt>false</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="blocks" ref="blocks">
      <callseq>
        <obj>statfile</obj>.blocks
        <returns><obj>anInteger</obj></returns>
      </callseq>
      <desc>
<p/>
      Returns the number of native file system blocks allocated for
      this file, or 0
      if the operating system doesn't support this feature.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").blocks
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").blocks</tt></td>
  <td>&#187;</td>
  <td><tt>2</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="chardev?" ref="chardev_qm">
      <callseq>
        <obj>statfile</obj>.chardev?
        <returns><const>true</const> or <const>false</const></returns>
      </callseq>
      <desc>
<p/>
      Returns <const>true</const> if the file is a character device, <const>false</const>
      if it isn't or 
      if the operating system doesn't support this feature.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("/dev/tty").chardev?
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("/dev/tty").chardev?</tt></td>
  <td>&#187;</td>
  <td><tt>true</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="ctime" ref="ctime">
      <callseq>
        <obj>statfile</obj>.ctime
        <returns><obj>aTime</obj></returns>
      </callseq>
      <desc>
<p/>
      Returns the change time for <obj>statfile</obj> (that is, the time
      directory information about the file was changed, not the file
      itself).
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").ctime
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").ctime</tt></td>
  <td>&#187;</td>
  <td><tt>Sun<nbsp/>Jun<nbsp/>09<nbsp/>00:17:19<nbsp/>CDT<nbsp/>2002</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="dev" ref="dev">
      <callseq>
        <obj>statfile</obj>.dev
        <returns><obj>aFixnum</obj></returns>
      </callseq>
      <desc>
<p/>
      Returns an integer representing the device on which <obj>statfile</obj>
      resides.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").dev
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").dev</tt></td>
  <td>&#187;</td>
  <td><tt>774</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="directory?" ref="directory_qm">
      <callseq>
        <obj>statfile</obj>.directory?
        <returns><const>true</const> or <const>false</const></returns>
      </callseq>
      <desc>
<p/>
      Returns <const>true</const> if <obj>statfile</obj> is a directory, <const>false</const> 
      otherwise.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").directory?
        File.stat(".").directory?
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").directory?</tt></td>
  <td>&#187;</td>
  <td><tt>false</tt></td>
</tr>
<tr>
  <td><tt>File.stat(".").directory?</tt></td>
  <td>&#187;</td>
  <td><tt>true</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="executable?" ref="executable_qm">
      <callseq>
        <obj>statfile</obj>.executable?
        <returns><const>true</const> or <const>false</const></returns>
      </callseq>
      <desc>
<p/>
      Returns <const>true</const> if <obj>statfile</obj> is executable or if the
      operating system doesn't distinguish executable files from
      nonexecutable files.  The tests are made using the effective
      owner of the process.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").executable?
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").executable?</tt></td>
  <td>&#187;</td>
  <td><tt>false</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="executable_real?" ref="executable_real_qm">
      <callseq>
        <obj>statfile</obj>.executable_real?
    <returns><const>true</const> or <const>false</const></returns>
      </callseq>
      <desc>
<p/>
      Same as <tt>executable?</tt>, but tests using the real owner of the
      process.
<p/>
      </desc>
    </method>
<p/>
        <method name="file?" ref="file_qm">
      <callseq>
        <obj>statfile</obj>.file?
        <returns><const>true</const> or <const>false</const></returns>
      </callseq>
      <desc>
<p/>
     Returns <const>true</const> if <obj>statfile</obj> is a regular file (not a device 
     file, pipe, socket, etc.).
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").file?
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").file?</tt></td>
  <td>&#187;</td>
  <td><tt>true</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="ftype" ref="ftype">
      <callseq>
        <obj>statfile</obj>.ftype
        <returns><obj>fileType</obj></returns>
      </callseq>
      <desc>
<p/>
      Identifies the type of <obj>statfile</obj>.
      The return string is one of: 
        ``<tt>file</tt>'',
        ``<tt>directory</tt>'',
        ``<tt>characterSpecial</tt>'',
        ``<tt>blockSpecial</tt>'',
        ``<tt>fifo</tt>'',
        ``<tt>link</tt>'', or
        ``<tt>socket</tt>''.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("/dev/tty").ftype
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("/dev/tty").ftype</tt></td>
  <td>&#187;</td>
  <td><tt>"characterSpecial"</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="gid" ref="gid">
      <callseq>
        <obj>statfile</obj>.gid
        <returns><obj>aFixnum</obj></returns>
      </callseq>
      <desc>
<p/>
      Returns the numeric group id of the owner of <obj>statfile</obj>.      
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").gid
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").gid</tt></td>
  <td>&#187;</td>
  <td><tt>500</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="grpowned?" ref="grpowned_qm">
      <callseq>
        <obj>statfile</obj>.grpowned?
        <returns><const>true</const> or <const>false</const></returns>
      </callseq>
      <desc>
<p/>
      Returns true if the effective group id of the process is the same 
      as the group id of <obj>statfile</obj>.
      On Windows NT, returns <const>false</const>.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").grpowned?
        File.stat("/etc/passwd").grpowned?
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").grpowned?</tt></td>
  <td>&#187;</td>
  <td><tt>true</tt></td>
</tr>
<tr>
  <td><tt>File.stat("/etc/passwd").grpowned?</tt></td>
  <td>&#187;</td>
  <td><tt>false</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="ino" ref="ino">
      <callseq>
        <obj>statfile</obj>.ino
        <returns><obj>aFixnum</obj></returns>
      </callseq>
      <desc>
<p/>
      Returns the inode number for <obj>statfile</obj>.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").ino
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").ino</tt></td>
  <td>&#187;</td>
  <td><tt>43331</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="mode" ref="mode">
      <callseq>
        <obj>statfile</obj>.mode
        <returns><obj>aFixnum</obj></returns>
      </callseq>
      <desc>
<p/>
      Returns an integer representing the permission bits of
      <obj>statfile</obj>.  The meaning of the bits is platform dependent; on Unix
      systems, see <tt>stat(2)</tt>.
<p/>
<codefragment>
<fullcode><![CDATA[        File.chmod(0644, "testfile")
        s = File.stat("testfile")
        sprintf("%o", s.mode)
]]></fullcode><rubycode>
<tr>
  <td><tt>File.chmod(0644,<nbsp/>"testfile")</tt></td>
  <td>&#187;</td>
  <td><tt>1</tt></td>
</tr>
<tr>
<td colspan="3"><tt>s<nbsp/>=<nbsp/>File.stat("testfile")</tt></td>
</tr>
<tr>
  <td><tt>sprintf("%o",<nbsp/>s.mode)</tt></td>
  <td>&#187;</td>
  <td><tt>"100644"</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="mtime" ref="mtime">
      <callseq>
        <obj>statfile</obj>.mtime
        <returns><obj>aTime</obj></returns>
      </callseq>
      <desc>
<p/>
      Returns the modification time for <obj>statfile</obj>.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").mtime
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").mtime</tt></td>
  <td>&#187;</td>
  <td><tt>Sun<nbsp/>Jun<nbsp/>09<nbsp/>00:17:19<nbsp/>CDT<nbsp/>2002</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="nlink" ref="nlink">
      <callseq>
        <obj>statfile</obj>.nlink
        <returns><obj>aFixnum</obj></returns>
      </callseq>
      <desc>
<p/>
      Returns the number of hard links to <obj>statfile</obj>.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").nlink
        File.link("testfile", "testfile.bak")
        File.stat("testfile").nlink
!-          File.delete("testfile.bak")
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").nlink</tt></td>
  <td>&#187;</td>
  <td><tt>1</tt></td>
</tr>
<tr>
  <td><tt>File.link("testfile",<nbsp/>"testfile.bak")</tt></td>
  <td>&#187;</td>
  <td><tt>0</tt></td>
</tr>
<tr>
  <td><tt>File.stat("testfile").nlink</tt></td>
  <td>&#187;</td>
  <td><tt>2</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="owned?" ref="owned_qm">
      <callseq>
        <obj>statfile</obj>.owned?
        <returns><const>true</const> or <const>false</const></returns>
      </callseq>
      <desc>
<p/>
      Returns <const>true</const> if the effective user id of the process is the same 
      as the owner of <obj>statfile</obj>.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").owned?
        File.stat("/etc/passwd").owned?
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").owned?</tt></td>
  <td>&#187;</td>
  <td><tt>true</tt></td>
</tr>
<tr>
  <td><tt>File.stat("/etc/passwd").owned?</tt></td>
  <td>&#187;</td>
  <td><tt>false</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="pipe?" ref="pipe_qm">
      <callseq>
        <obj>statfile</obj>.pipe?
        <returns><const>true</const> or <const>false</const></returns>
      </callseq>
      <desc>
<p/>
      Returns <const>true</const> if the operating system supports pipes and
      <obj>statfile</obj> is a pipe; <const>false</const> otherwise.
<p/>
      </desc>
    </method>
<p/>
        <method name="rdev" ref="rdev">
      <callseq>
        <obj>statfile</obj>.rdev
        <returns><obj>aFixnum</obj></returns>
      </callseq>
      <desc>
<p/>
      Returns an integer representing the device type on which <obj>statfile</obj>
      resides.  Returns <tt>0</tt> 
      if the operating system doesn't support this feature.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("/dev/fd0").rdev
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("/dev/fd0").rdev</tt></td>
  <td>&#187;</td>
  <td><tt>512</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="readable?" ref="readable_qm">
      <callseq>
        <obj>statfile</obj>.readable?
        <returns><const>true</const> or <const>false</const></returns>
      </callseq>
      <desc>
<p/>
      Returns <const>true</const> if <obj>statfile</obj> is readable by the effective
      user id of this process.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").readable?
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").readable?</tt></td>
  <td>&#187;</td>
  <td><tt>true</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="readable_real?" ref="readable_real_qm">
      <callseq>
        <obj>statfile</obj>.readable_real?
        <returns><const>true</const> or <const>false</const></returns>
      </callseq>
      <desc>
<p/>
      Returns <const>true</const> if <obj>statfile</obj> is readable by the real
      user id of this process.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").readable_real?
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").readable_real?</tt></td>
  <td>&#187;</td>
  <td><tt>true</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="setgid?" ref="setgid_qm">
      <callseq>
        <obj>statfile</obj>.setgid?
        <returns><const>true</const> or <const>false</const></returns>
      </callseq>
      <desc>
<p/>
      Returns <const>true</const> if <obj>statfile</obj> has the set-group-id      
      permission bit set, <const>false</const> if it doesn't or
      if the operating system doesn't support this feature.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("/usr/sbin/lpc").setgid?
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("/usr/sbin/lpc").setgid?</tt></td>
  <td>&#187;</td>
  <td><tt>true</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="setuid?" ref="setuid_qm">
      <callseq>
        <obj>statfile</obj>.setuid?
        <returns><const>true</const> or <const>false</const></returns>
      </callseq>
      <desc>
<p/>
      Returns <const>true</const> if <obj>statfile</obj> has the set-user-id
      permission bit set, <const>false</const> if it doesn't or
      if the operating system doesn't support this feature.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("/bin/su").setuid?
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("/bin/su").setuid?</tt></td>
  <td>&#187;</td>
  <td><tt>true</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="size" ref="size">
      <callseq>
        <obj>statfile</obj>.size
        <returns><obj>aFixnum</obj></returns>
      </callseq>
      <desc>
<p/>
      Returns the size of <obj>statfile</obj> in bytes.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").size
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").size</tt></td>
  <td>&#187;</td>
  <td><tt>66</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="size?" ref="size_qm">
      <callseq>
        <obj>statfile</obj>.size?
        <returns><obj>aFixnum</obj> or <tt>nil</tt></returns>
      </callseq>
      <desc>
<p/>
      Returns <tt>nil</tt> if <obj>statfile</obj> is a zero-length file; otherwise,
      returns the file size.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").size?
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").size?</tt></td>
  <td>&#187;</td>
  <td><tt>66</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="socket?" ref="socket_qm">
      <callseq>
        <obj>statfile</obj>.socket?
        <returns><const>true</const> or <const>false</const></returns>
      </callseq>
      <desc>
<p/>
      Returns <const>true</const> if <obj>statfile</obj> is a socket, <const>false</const> if
      it isn't or 
      if the operating system doesn't support this feature.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").socket?
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").socket?</tt></td>
  <td>&#187;</td>
  <td><tt>false</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="sticky?" ref="sticky_qm">
      <callseq>
        <obj>statfile</obj>.sticky?
        <returns><const>true</const> or <const>false</const></returns>
      </callseq>
      <desc>
<p/>
      Returns <const>true</const> if <obj>statfile</obj> has its sticky bit set,
      <const>false</const> if it doesn't or if the operating system doesn't
      support this feature.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").sticky?
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").sticky?</tt></td>
  <td>&#187;</td>
  <td><tt>false</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="symlink?" ref="symlink_qm">
      <callseq>
        <obj>statfile</obj>.symlink?
        <returns><const>true</const> or <const>false</const></returns>
      </callseq>
      <desc>
<p/>
      Returns <const>true</const> if <obj>statfile</obj> is a symbolic link,
      <const>false</const> if it isn't or if the operating system doesn't
      support this feature. As <ccm><file>file</file><front>File</front><back>stat</back><mref>stat</mref></ccm> automatically follows
      symbolic links, <meth>symlink?</meth> will always be
      <const>false</const> for an object returned by <ccm><file>file</file><front>File</front><back>stat</back><mref>stat</mref></ccm>.
<p/>
<codefragment>
<fullcode><![CDATA[        File.symlink("testfile", "alink")
        File.stat("alink").symlink?
        File.lstat("alink").symlink?
!-      File.delete("alink")
]]></fullcode><rubycode>
<tr>
  <td><tt>File.symlink("testfile",<nbsp/>"alink")</tt></td>
  <td>&#187;</td>
  <td><tt>0</tt></td>
</tr>
<tr>
  <td><tt>File.stat("alink").symlink?</tt></td>
  <td>&#187;</td>
  <td><tt>false</tt></td>
</tr>
<tr>
  <td><tt>File.lstat("alink").symlink?</tt></td>
  <td>&#187;</td>
  <td><tt>true</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="uid" ref="uid">
      <callseq>
        <obj>statfile</obj>.uid
        <returns><obj>aFixnum</obj></returns>
      </callseq>
      <desc>
<p/>
      Returns the numeric user id of the owner of <obj>statfile</obj>.      
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").uid
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").uid</tt></td>
  <td>&#187;</td>
  <td><tt>501</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="writable?" ref="writable_qm">
      <callseq>
        <obj>statfile</obj>.writable?
        <returns><const>true</const> or <const>false</const></returns>
      </callseq>
      <desc>
<p/>
      Returns <const>true</const> if <obj>statfile</obj> is writable by the effective
      user id of this process.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").writable?
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").writable?</tt></td>
  <td>&#187;</td>
  <td><tt>true</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="writable_real?" ref="writable_real_qm">
      <callseq>
        <obj>statfile</obj>.writable_real?
        <returns><const>true</const> or <const>false</const></returns>
      </callseq>
      <desc>
<p/>
      Returns <const>true</const> if <obj>statfile</obj> is writable by the real
      user id of this process.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").writable_real?
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").writable_real?</tt></td>
  <td>&#187;</td>
  <td><tt>true</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
        <method name="zero?" ref="zero_qm">
      <callseq>
        <obj>statfile</obj>.zero?
        <returns><const>true</const> or <const>false</const></returns>
      </callseq>
      <desc>
<p/>
      Returns <const>true</const> if <obj>statfile</obj> is a zero-length file; <const>false</const>
      otherwise.
<p/>
<codefragment>
<fullcode><![CDATA[        File.stat("testfile").zero?
]]></fullcode><rubycode>
<tr>
  <td><tt>File.stat("testfile").zero?</tt></td>
  <td>&#187;</td>
  <td><tt>false</tt></td>
</tr>
</rubycode>
<p/>
</codefragment>
<p/>
      </desc>
    </method>
<p/>
  </methods>
<p/>
</class>
</ppdoc>
