int nemo_file_size(name)char *name;int nemo_file_time(name)char *name; int nemo_file_lines(name, deflen)char *nameint deflen
nemo_file_time is simular to nemo_file_size., except it returns the age of a file in seconds, since 1970.0 in the usual fashion (see also stat(2) ).
nemo_file_lines counts the number of lines in a text file but counting the number of occurences of a newline. This routine will hence not work correctly on MSDOS. Also, the file must be a proper file, as detected with isatty(3) . A hint, defline can be given, to simplify use in calling programs. A positive number means that both a pipe and file will return this number (and hence possibly not read enough). Zero will force computation of the number of lines by scanning over the file, which can only be done for true files, and is expensive. Pipes will use the MAXLINES (see stdinc.h, normally 10000) macro. For negatives values, pipes will use -deflen, whereas files will do the expensive computation.
~/src/kernel/cores file_size.c file_size.3
8-feb-90 V1.0 created for SUN’s PJT 25-nov-90 V1.1 doc written for earlier released file_lines PJT 7-jun-96 documented outstanding (nov93) argument change in file_lines pjt 24-oct-97 added file_time() PJT 21-sep-03 changed meaning of deflen in nemo_file_lines PJT