Get the length of a file.
long _filelength( int fd ); __int64 _filelengthi64( int fd );
- Target file descriptor.
Both _filelength and _filelengthi64 return the file length, in bytes, of the target file associated with fd. Both functions return a value of –1L to indicate an error, and an invalid file descriptor sets errno to EBADF.
|_filelength||<io.h>||Win 98, Win Me, Win NT, Win 2000, Win XP|
|_filelengthi64||<io.h>||Win 98, Win Me, Win NT, Win 2000, Win XP|
For additional compatibility information, see Compatibility in the Introduction.
All versions of the C run-time libraries.
See the example for _chsize.