paul@181 | 1 | /* |
paul@181 | 2 | * File metadata abstractions. |
paul@181 | 3 | * |
paul@181 | 4 | * Copyright (C) 2019 Paul Boddie <paul@boddie.org.uk> |
paul@181 | 5 | * |
paul@181 | 6 | * This program is free software; you can redistribute it and/or |
paul@181 | 7 | * modify it under the terms of the GNU General Public License as |
paul@181 | 8 | * published by the Free Software Foundation; either version 2 of |
paul@181 | 9 | * the License, or (at your option) any later version. |
paul@181 | 10 | * |
paul@181 | 11 | * This program is distributed in the hope that it will be useful, |
paul@181 | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
paul@181 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
paul@181 | 14 | * GNU General Public License for more details. |
paul@181 | 15 | * |
paul@181 | 16 | * You should have received a copy of the GNU General Public License |
paul@181 | 17 | * along with this program; if not, write to the Free Software |
paul@181 | 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, |
paul@181 | 19 | * Boston, MA 02110-1301, USA |
paul@181 | 20 | */ |
paul@181 | 21 | |
paul@181 | 22 | #pragma once |
paul@181 | 23 | |
paul@181 | 24 | #include <systypes/base.h> |
paul@181 | 25 | #include <systypes/timespec.h> |
paul@181 | 26 | |
paul@181 | 27 | EXTERN_C_BEGIN |
paul@181 | 28 | |
paul@181 | 29 | /* File metadata abstraction. */ |
paul@181 | 30 | |
paul@181 | 31 | typedef struct |
paul@181 | 32 | { |
paul@181 | 33 | sys_dev_t st_dev; |
paul@181 | 34 | sys_ino_t st_ino; |
paul@181 | 35 | sys_mode_t st_mode; |
paul@181 | 36 | sys_nlink_t st_nlink; |
paul@181 | 37 | sys_uid_t st_uid; |
paul@181 | 38 | sys_gid_t st_gid; |
paul@181 | 39 | sys_dev_t st_rdev; |
paul@181 | 40 | sys_off_t st_size; |
paul@181 | 41 | struct sys_timespec st_atim; |
paul@181 | 42 | struct sys_timespec st_mtim; |
paul@181 | 43 | struct sys_timespec st_ctim; |
paul@181 | 44 | sys_blksize_t st_blksize; |
paul@181 | 45 | sys_blkcnt_t st_blocks; |
paul@181 | 46 | |
paul@181 | 47 | } sys_stat_t; |
paul@181 | 48 | |
paul@181 | 49 | EXTERN_C_END |