mud/lib/doc/efun/filesystem/file_length
2020-09-06 05:43:07 -07:00

16 lines
440 B
Plaintext

file_length - get the number of lines in a file
int file_length( string file );
file_length() returns the number of lines in file 'file'. Size -1
indicates that 'file' either does not exist, or that it is not
readable. Size -2 indicates that 'file' is a directory.
Note that this efun is not particularly fast on long files, since
determining the number of lines requires reading the entire file.
See also:
file_size,
stat,
get_dir