[linux] Ekvivalent filelength..

Ondrej Jombik nepto na pobox.sk
Středa Červenec 3 23:43:55 CEST 2002


> long	filelength( char *name)
> {
>     struct stat status;
>     if (stat(name, &status)==-1) return 0;
>     return status.st_size;
> }

	Vhladom nato, ze 0 je regularna dlzka suboru, radsej by som pri 
chybe vracial -1.

	=Nepto=
____________________________________________________________________________
Ondrej 'Nepto' Jombik, perl -le '$_=1;(1x$_)!~/^(11+)\1+$/&&print while$_++'





Další informace o konferenci linux