fedir
8fcfebe3f9
Now filesystem implements getattr through source_stat, which is a wrapper for an fstatat with `dirfd == handle.root_path`.
24 lines
418 B
C
24 lines
418 B
C
|
|
|
|
#ifndef SOURCEFS_H
|
|
#define SOURCEFS_H
|
|
|
|
#include <sys/stat.h>
|
|
|
|
/**
|
|
* Initializes the source file handling.
|
|
*
|
|
* @param root_path The root of the source files folder.
|
|
* @return 0 on success, 1 on failure.
|
|
*/
|
|
int source_init(const char *root_path);
|
|
|
|
/**
|
|
* `stat()`, but for source files.
|
|
*
|
|
* @see `stat()`
|
|
*/
|
|
int source_stat(const char *restrict pathname, struct stat *restrict statbuf);
|
|
|
|
#endif // !SOURCEFS_H
|