25 lines
557 B
C
25 lines
557 B
C
#ifndef __STAT_H
|
|
#define __STAT_H
|
|
|
|
#define T_DIR 1 // Directory
|
|
#define T_FILE 2 // File
|
|
#define T_DEVICE 3 // Device
|
|
|
|
#define STAT_MAX_NAME 32
|
|
|
|
struct stat {
|
|
char name[STAT_MAX_NAME + 1];
|
|
int dev; // File system's disk device
|
|
short type; // Type of file
|
|
uint64 size; // Size of file in bytes
|
|
};
|
|
|
|
// struct stat {
|
|
// int dev; // File system's disk device
|
|
// uint ino; // Inode number
|
|
// short type; // Type of file
|
|
// short nlink; // Number of links to file
|
|
// uint64 size; // Size of file in bytes
|
|
// };
|
|
|
|
#endif |