title: What Stat type store in Doors DXL?
body: <p>What is the purpose of the <code>Stat</code> type? Something like the status of an operation? I did not find much in the DXL Reference Manual 9.6.</p>
  
  <blockquote>
    <p>The functions that use the Stat data type work on the stat API
    provided by the operating system, which enables DXL programs to
    determine the status of files and directories</p>
  </blockquote>
  
  <p>To be more clear I will post one of its usages:</p>
  
  <pre><code>/************************************
      isDirectory
  
      Returns true if string parameter is a valid directory
  ************************************/
  bool isDirectory(string dn)
  {
      Stat s = create dn
  
      if (null s) return false
      if (directory s)
      {
          delete s
          return true
      }
      delete s
      return false
  } 
  </code></pre>
  
  <p>Or the code like this:</p>
  
  <pre><code>/************************************
      getFileSize
  
      returns the size (in bytes) of a file. note that files smaller than
      the block size on the disc still take up a whole block.
  ************************************/
  int getFileSize(string fn)
  {
      int fSize = 0
      Stat s = create fn
      if (null s) return(0)
  
      fSize = size(s)
      if (fSize &lt; BLOCK_SIZE) fSize = BLOCK_SIZE
  
      delete s
      return(fSize)
  }
  </code></pre>
  
  <p><strong>Edit</strong>:</p>
  
  <p><em>Or Perms like:</em></p>
  
  <p>Date modified (Stat)</p>
  
  <p>bool symbolic (Stat)</p>
  
  <p>Date accessed (Stat)</p>
  
  <p>Stat create (Symbolic__)</p>
  
  <p>void delete (Stat)</p>
  
  <p>string user (Stat)</p>
  
  <p>int size (Stat)</p>