-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathstat.c
More file actions
31 lines (26 loc) · 740 Bytes
/
stat.c
File metadata and controls
31 lines (26 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* note that this is only the correct struct stat for 64 bit architectures */
struct stat {
unsigned long st_dev;
unsigned long st_ino;
unsigned long st_nlink;
unsigned int st_mode;
unsigned int st_uid;
unsigned int st_gid;
unsigned int __pad0;
unsigned long st_rdev;
long st_size;
long st_blksize;
long st_blocks;
unsigned long st_atime;
unsigned long st_atime_nsec;
unsigned long st_mtime;
unsigned long st_mtime_nsec;
unsigned long st_ctime;
unsigned long st_ctime_nsec;
long __unused[3];
};
struct example {
int x, y, z;
};
int stat(const char *path, struct stat *buf);
int lstat(const char *path, struct stat *buf);