| Concept Framework 2.2 documentation | Contents | Index |
| Name | Version | Deprecated |
| fsize | version 1.0 | no |
| number fsize(number fd) |
| fd | [in] A valid file descriptor |
| Gets the file length, in bytes, of the target file. |
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
|
| Documented by Simona Plesuvu, generation time: Sun Jan 27 18:15:15 2013 GMT | (c)2013 Devronium Applications |