Skip to content

Latest commit

 

History

History
26 lines (15 loc) · 747 Bytes

fstat.md

File metadata and controls

26 lines (15 loc) · 747 Bytes

Syscall fstat

User Mode

#include <stat.h>
int32_t fstat(FILE_DESCRIPTOR fd, struct stat *buffer);

int32_t stat(const char *path, struct stat *buffer);

Returns file stats like file type, size, inode number etc. See struct stat for details.

User Apps

The app stat exposes this syscall.

Kernel Mode

Implemented in sys_file.c as sys_fstat().

See also

Overview: syscalls

File Management Syscalls: mkdir | rmdir | get_dirent | mknod | open | close | read | write | lseek | dup | link | unlink | fstat