Export (0) Print
Expand All
div
Expand Minimize
This topic has not yet been rated - Rate this topic

_filelength, _filelengthi64

Get the length of a file.

long _filelength( 
   int fd 
);
__int64 _filelengthi64( 
   int fd 
);

Parameter

fd
Target file descriptor.

Return Value

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.

Requirements

Function Required header Compatibility
_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.

Libraries

All versions of the C run-time libraries.

Example

See the example for _chsize.

See Also

File Handling Routines | _chsize | _fileno | _fstat | _fstati64 | _stat | _stati64 | Run-Time Routines and .NET Framework Equivalents

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.