#pragma once /* * time */ /* timeval */ typedef struct sys·TimeStamp sys·TimeStamp; struct sys·TimeStamp { int64 sec; uint32 nano; int32 femto; }; /* * files */ typedef struct sys·Info sys·Info; typedef struct sys·Directory sys·Directory; typedef struct sys·DirEntry sys·DirEntry; /* statx */ struct sys·Info { uint32 mask; uint32 blksize; uint64 attr; uint32 nlink; uint32 uid; uint32 gid; uint16 mode; uint16 _pad; uint64 inode; uint64 size; uint64 nblk; uint64 attrmask; sys·TimeStamp access, create, status, modify; struct{ uint32 major; uint32 minor; }spdev; struct{ uint32 major; uint32 minor; }device; uint64 spare[14]; }; struct sys·Directory { intptr off; int fd; int pad; int pos, end; /* buf needs fall on (off_t) 8 byte alignment */ char buf[2048]; }; struct sys·DirEntry { ulong ino; /* inode number */ ulong off; /* offset to next entry (from start of directory */ ushort len; /* length of entry (in bytes) */ uchar type; /* filetype */ char name[]; /* filename */ };