Nios® V Processor Software Developer Handbook

ID 743810
Date 10/02/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

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

--