Nios® V Processor Software Developer Handbook

ID 743810
Date 7/08/2024
Public
Document Table of Contents

16.1.1.60. 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

--