# C1.Util.DX.DirectWrite.FontFileStream.GetFileSize

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_DirectWrite_FontFileStream_GetFileSize_" data-uid="C1.Util.DX.DirectWrite.FontFileStream.GetFileSize*">GetFileSize Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_DirectWrite_FontFileStream_GetFileSize_" data-uid="C1.Util.DX.DirectWrite.FontFileStream.GetFileSize*"></a>
<h4 id="C1_Util_DX_DirectWrite_FontFileStream_GetFileSize" data-uid="C1.Util.DX.DirectWrite.FontFileStream.GetFileSize">GetFileSize()</h4>
<div class="markdown level1 summary"><p>Obtains the total size of a file.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">long GetFileSize()</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function GetFileSize() As Long</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int64">long</a></td>
      <td><p>the total size of the file.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Util_DX_DirectWrite_FontFileStream_GetFileSize_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Implementing GetFileSize() for asynchronously loaded font files may require downloading the complete file contents. Therefore, this method should be used only for operations that either require a complete font file to be loaded (for example, copying a font file) or that need to make decisions based on the value of the file size (for example, validation against a persisted file size).</p>
</div>
</div>
