<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1632085368384154" crossorigin="anonymous"></script><script src="https://autohotkey.top/gtag.js"></script></head> <body> <h1>DriveGetCapacity</h1> <p>返回包含指定路径的驱动器的总容量, 单位为 mb(兆字节).</p> <pre class="Syntax">Capacity := <span class="func">DriveGetCapacity</span>(Path)</pre> <h2 id="Parameters">参数</h2> <dl> <dt>Path</dt> <dd> <p>类型: <a href="../Concepts.htm#strings">字符串</a></p> <p>驱动器包含的任意路径(也可能对 UNC 路径和映射驱动器有效).</p> </dd> </dl> <h2 id="Return_Value">返回值</h2> <p>类型: <a href="../Concepts.htm#numbers">整数</a></p> <p>函数返回包含指定路径的驱动器的总容量, 单位为 mb(兆字节).</p> <h2 id="Error_Handling">错误处理</h2> <p>失败时抛出异常.</p> <h2 id="Remarks">备注</h2> <p>一般来说, <em>Path</em> 可以是任意路径. 由于 NTFS 支持挂载卷和目录连接, 具有相同驱动器号的不同路径可以产生不同数量的容量.</p> <h2 id="Related">相关</h2> <p><a href="DriveGetSpaceFree.htm">DriveGetSpaceFree</a>, <a href="Drive.htm">驱动器函数</a></p> <h2 id="Examples">示例</h2> <p>有关此函数的演示, 请参阅<a href="Drive.htm">驱动器函数</a>页面的<a href="Drive.htm#ExAnalyzeDrive">示例 #1</a>.</p> <a href="https://dftg.net">dftg</a></body> </html>