This function returns a string representing the size of file_name
according to the format described by format_string
. Both file_name
and
format_string
can be any valid expression:
fsize ("file_name", "format_string");
fsize (variable_storing_file, variable_storing_format);
fsize ("file_name", variable_storing_format);
fsize (variable_storing_file, "format_string");
It simply returns format_string
interpreting the
following sequences:
size in bytes
size in Kbytes
size in Mbytes
Important: if you use Cows-mkgen
to create makefiles, file_name
can only be provided as a
string constant (e.g. "foo.ps") or via the inputfile ()
and outputfile ()
functions; otherwise, Cows-mkgen will miss the dependency and raise a warning. Of course,
Cows will correctly display file size, since it can handle complex expressions, but if
the file is changed, make won't update output file. For further informations see Section 24.1.
Assuming manual.ps is 277347 bytes long,
echo (fdate ("manual.ps", "#k K (#b bytes)"));
will display:
270.947 K (277347 bytes)
This manual can be downloaded from http://www.g-cows.org/.