MentOS  0.8.0
The Mentoring Operating System
Functions
stat.c File Reference

Stat functions. More...

Functions

int sys_stat (const char *path, stat_t *buf)
 Stat the file at the given path. More...
 
int sys_fstat (int fd, stat_t *buf)
 Retrieves information about the file at the given location. More...
 

Detailed Description

Stat functions.

Function Documentation

◆ sys_fstat()

int sys_fstat ( int  fd,
stat_t buf 
)

Retrieves information about the file at the given location.

Parameters
fdThe file descriptor of the file that is being inquired.
bufA structure where data about the file will be stored.
Returns
Returns a negative value on failure.

◆ sys_stat()

int sys_stat ( const char *  path,
stat_t buf 
)

Stat the file at the given path.

Parameters
pathPath to the file for which we are retrieving the statistics.
bufBuffer where we are storing the statistics.
Returns
0 on success, a negative number if fails and errno is set.