函数参考


_WinAPI_GetFileSizeOnDisk

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 值.

注意/说明

None

相关

详情参考

None

示例/演示


#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)