Concept Framework 1.0 documentation Contents | Index

standard.C.io.fsize

Name Version Deprecated
fsize version 1.0 no

Prototype:
number fsize(number fd)

Parameters:
fd      [in] A valid file descriptor

Description:
Gets the file length, in bytes, of the target file.

Example:
import standard.C.io


define FILENAME "test.txt"

class Main {
function Main() {
if(!(var fd = fopen( FILENAME, "r" )))
echo "The file " + FILENAME + " was not opened\n";
else {
var buffer = "";
fread(buffer, 1, fsize(fd), fd);
echo buffer;
fclose(fd);
}
}
}

Results
Content of the file

Returns:
Returns the file length, in bytes, of the target file

Documented by Simona Plesuvu, generation time: Thu Oct 15 20:02:04 2009 GMT(c)2009 RadGs Software