Difference between revisions of "FileSize"
From SCAR Divi Manual
(→Description) |
|||
(One intermediate revision by the same user not shown) | |||
Line 27: | Line 27: | ||
end. | end. | ||
</source> | </source> | ||
+ | |||
+ | Output: | ||
+ | 12 | ||
==See Also== | ==See Also== | ||
Line 33: | Line 36: | ||
*[[OpenFile]] | *[[OpenFile]] | ||
*[[RewriteFile]] | *[[RewriteFile]] | ||
+ | *[[AppendFile]] | ||
*[[CloseFile]] | *[[CloseFile]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:File Functions]] | [[Category:File Functions]] |
Latest revision as of 23:23, 2 November 2011
Definition
function FileSize(FileNum: Integer): LongInt;
Availability
SCAR Divi 3.00 > Current
Description
Returns the file size of the file open in a stream associated with the index FileNum in the file stream resource manager. Getting the file size of a file without opening it is possible with GetFileSize.
Example
var f: Integer; begin f := Rewritefile(LogsPath + 'Test.txt', False); WriteFileString(f, 'Hello World!'); CloseFile(f); f := OpenFile(LogsPath + 'Test.txt', False); WriteLn(FileSize(f)); CloseFile(f); DeleteFile(LogsPath + 'Test.txt'); end.
Output:
12