Specifications
Related Information
newlib Library Documentation
stat()
Prototype
int stat(const char *file_name,
struct stat *buf);
Commonly Called By
C/C++ programs
Device drivers
Thread-safe
See description.
Available from ISR
No.
Include
<sys/stat.h>
Description
The stat() function is similar to the fstat() function—It obtains status information about a file.
Instead of using an open file descriptor, like fstat(), stat() takes the name of a file as an input
argument.
Calls to stat() are thread-safe only if the implementation of stat() provided by the driver that is
manipulated is thread-safe.
Internally, the stat() function is implemented as a call to fstat().
Return
--
Related Information
• fcntl() on page 14-57
• fstat() on page 14-55
• ioctl() on page 14-73
• isatty() on page 14-74
• lseek() on page 14-64
• open() on page 14-66
• read() on page 14-68
• write() on page 14-69
• newlib Library Documentation
14-60
stat()
NII5V2
2015.05.14
Altera Corporation
HAL API Reference
Send Feedback