xHarbour Reference Documentation > Function Reference |
Returns the size of a file in bytes.
HB_FSize( <cFileName> ) --> nFileSize
The function returns a numeric value indicating the size of the file <cFileName> in bytes. If the file does not exist, the return value is 0.
Function HB_FSize() is used to determine the size of a single file in bytes. Note that the return value of this function is 0 for an existing file with no contents and for a none existing file. Use function File() to check for the existence of a file.
See also: | Directory(), FileStats(), FCreate(), FOpen() |
Category: | Low level file functions , xHarbour extensions |
Source: | rtl\fssize.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example displays the size of a single file PROCEDURE Main LOCAL cFileName := "HB_FSize.prg" ? HB_FSize( cFileName ) RETURN
http://www.xHarbour.com