Retrieves the file allocation size on disk.
#Include <WinAPIEx.au3>
_WinAPI_GetFileSizeOnDisk ( $sFile )
$sFile | The name of the file to retrieve allocation size. |
Success | The allocation size, in bytes. This value is a multiple of the sector or cluster size of the specified |
失败: | 返回 0 并设置 @error 标志为非 0 值. |
#Include <WinAPIEx.au3>
Opt('MustDeclareVars', 1)
Global Const $sFile = @ScriptFullPath
ConsoleWrite('Localtion: ' & $sFile & @CR)
ConsoleWrite('Size: ' & FileGetSize($sFile) & @CR)
ConsoleWrite('Size on disk: ' & _WinAPI_GetFileSizeOnDisk($sFile) & @CR)