OS.File.Info

  • Revision slug: JavaScript_OS.File/OS.File.Info
  • Revision title: OS.File.Info
  • Revision id: 320667
  • Created:
  • Creator: Yoric
  • Is current revision? No
  • Comment

Revision Content

Instances of OS.File.Info represent file metadata, such as the size of the file, its last modification date, etc. Some information is available only on some platforms.

Instances of OS.File.Info may be obtained by:

 

Global object OS.File.Info

Methods

object toMsg(in OS.File.Info value)

OS.File.toMsg

Convert an instance of OS.File.Info to a form that can be serialized and transmitted between threads or processes.

object toMsg(
  in OS.File.Info value
)
Arguments
Returns

An object with the same fields as value but that may be serialized and transmitted between threads or processes.

value
An instance of OS.File.Info.

Instances of OS.File.Info

Cross-platform Attributes

isDir true if the file is a directory, false otherwise.
isSymLink true if the false is a symbolic link, false otherwise.
size The number of bytes in the file.
creationDate The Date at which the file was created.
lastAccessDate The Date at which the file was last accessed. Note that the definition of last access may depend on the underlying operating system and file system.
lastModificationDate The Date at which the file was last modified.

Platform-specific attributes (Unix)

unixOwner A number holding the identifier of the Unix owner of this file.
unixGroup A number holding the identifier of the Unix group of this file.
unixMode A number holding the Unix access rights to this file.

 

Revision Source

<p>Instances of OS.File.Info represent file metadata, such as the size of the file, its last modification date, etc. Some information is available only on some platforms.</p>
<p>Instances of OS.File.Info may be obtained by:</p>
<ul>
  <li>calling global method <code>OS.File.stat()</code> either <a href="/en-US/docs/JavaScript_OS.File/OS.File_for_the_main_thread#OS.File.stat" title="/en-US/docs/JavaScript_OS.File/OS.File_for_the_main_thread">from the main thread</a> or <a href="/en-US/docs/JavaScript_OS.File/OS.File_for_workers#OS.File.stat" title="/en-US/docs/JavaScript_OS.File/OS.File_for_workers">from a worker thread</a>;</li>
  <li>calling instance method <code>stat()</code> of <code>OS.File</code> either <a href="/en-US/docs/JavaScript_OS.File/OS.File_for_the_main_thread#OS.File.prototype.stat" title="/en-US/docs/JavaScript_OS.File/OS.File_for_the_main_thread#OS.File.prototype.stat">from the main thread</a> or <a href="/en-US/docs/JavaScript_OS.File/OS.File_for_workers#OS.File.prototype.stat" title="/en-US/docs/JavaScript_OS.File/OS.File_for_workers#OS.File.prototype.stat">from a worker thread</a>.</li>
</ul>
<p>&nbsp;</p>
<h2 id="Global_object_OS.File.Info_(TBD)">Global object OS.File.Info</h2>
<h4>Methods</h4>
<table>
  <tbody>
    <tr>
      <td>object <a href="#OS.File.toMsg" title="#OS.File.toMsg">toMsg</a>(in OS.File.Info value)</td>
    </tr>
  </tbody>
</table>
<h4>OS.File.toMsg<a name="OS.File.toMsg"></a></h4>
<p>Convert an instance of OS.File.Info to a form that can be serialized and transmitted between threads or processes.</p>
<pre class="brush: js">
object toMsg(
  in OS.File.Info value
)</pre>
<h5>Arguments</h5>
<h5>Returns</h5>
<p>An object with the same fields as value but that may be serialized and transmitted between threads or processes.</p>
<dl>
  <dt>
    value</dt>
  <dd>
    An instance of OS.File.Info.</dd>
</dl>
<h2 id="Instances_of_OS.File.Info">Instances of OS.File.Info</h2>
<h4 id="Cross-platform_Attributes">Cross-platform Attributes</h4>
<table>
  <tbody>
    <tr>
      <td>isDir</td>
      <td>true if the file is a directory, false otherwise.</td>
    </tr>
    <tr>
      <td>isSymLink</td>
      <td>true if the false is a symbolic link, false otherwise.</td>
    </tr>
    <tr>
      <td>size</td>
      <td>The number of bytes in the file.</td>
    </tr>
    <tr>
      <td>creationDate</td>
      <td>The Date at which the file was created.</td>
    </tr>
    <tr>
      <td>lastAccessDate</td>
      <td>The Date at which the file was last accessed. Note that the definition of <em>last access</em> may depend on the underlying operating system and file system.</td>
    </tr>
    <tr>
      <td>lastModificationDate</td>
      <td>The Date at which the file was last modified.</td>
    </tr>
  </tbody>
</table>
<h4 id="Platform-specific_attributes_(Unix)">Platform-specific attributes (Unix)</h4>
<table>
  <tbody>
    <tr>
      <td>unixOwner</td>
      <td>A number holding the identifier of the Unix owner of this file.</td>
    </tr>
    <tr>
      <td>unixGroup</td>
      <td>A number holding the identifier of the Unix group of this file.</td>
    </tr>
    <tr>
      <td>unixMode</td>
      <td>A number holding the Unix access rights to this file.</td>
    </tr>
  </tbody>
</table>
<p>&nbsp;</p>
Revert to this revision