# C1.Util.DX.Storage.NativeFileMode

## Content

<div class="doc-site-dotnet-api-container">




  <h1 id="C1_Util_DX_Storage_NativeFileMode" data-uid="C1.Util.DX.Storage.NativeFileMode" class="text-break">NativeFileMode Enum
</h1>
  <div class="markdown level0 summary"><p>Native file creation disposition.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Util.DX.Storage.html">C1.Util.DX.Storage</a></h6>
  <h6><strong>Assembly</strong>: C1.Win.DX.10.dll</h6>
  <h5 id="C1_Util_DX_Storage_NativeFileMode_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public enum NativeFileMode</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Enum NativeFileMode</code></pre>
  </div>
  <h3 id="fields">Fields
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    <thead>
    </thead></thead><tbody>
      <tr>
        <td id="C1_Util_DX_Storage_NativeFileMode_Create">Create</td>
        <td><p>Creates a new file, always.
If a file exists, the function overwrites the file, clears the existing attributes, combines the specified file attributes,
and flags with FILE_ATTRIBUTE_ARCHIVE, but does not set the security descriptor that the SECURITY_ATTRIBUTES structure specifies.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Storage_NativeFileMode_CreateNew">CreateNew</td>
        <td><p>Creates a new file. The function fails if a specified file exists.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Storage_NativeFileMode_Open">Open</td>
        <td><p>Opens a file. The function fails if the file does not exist.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Storage_NativeFileMode_OpenOrCreate">OpenOrCreate</td>
        <td><p>Opens a file, always.
If a file does not exist, the function creates a file as if dwCreationDisposition is CREATE_NEW.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Storage_NativeFileMode_Truncate">Truncate</td>
        <td><p>Opens a file and truncates it so that its size is 0 (zero) bytes. The function fails if the file does not exist.
The calling process must open the file with the GENERIC_WRITE access right.</p>
</td>
      </tr>
    </tbody>
  </table>
</div>
