Function Reference


_WinAPI_GetFileSizeOnDisk

Retrieves the file allocation size on disk

#include <WinAPIFiles.au3>
_WinAPI_GetFileSizeOnDisk ( $sFilePath )

Parameters

$sFilePath The name of the file to retrieve allocation size.

Return Value

Success: The allocation size, in bytes.
This value is a multiple of the sector or cluster size of the specified physical device.
Failure: 0, call _WinAPI_GetLastError() to get extended error information.

Example

#include <WinAPIFiles.au3>

Local Const $sFile = @ScriptFullPath

ConsoleWrite('Localtion:    ' & $sFile & @CRLF)
ConsoleWrite('Size:         ' & FileGetSize($sFile) & @CRLF)
ConsoleWrite('Size on disk: ' & _WinAPI_GetFileSizeOnDisk($sFile) & @CRLF)