module etc.stat; extern(C): version(Windows) { struct struct_stat { short st_dev; ushort st_ino; ushort st_mode; short st_nlink; ushort st_uid; ushort st_gid; short st_rdev; int st_size; int st_atime; int st_mtime; int st_ctime; } ushort _S_IFMT = 0xF000; ushort _S_IFREG = 0x8000; ushort _S_IFBLK = 0x6000; ushort _S_IFNAM = 0x5000; ushort _S_IFDIR = 0x4000; ushort _S_IFCHR = 0x2000; ushort _S_IREAD = 0x0100; ushort _S_IWRITE = 0x0080; ushort _S_IEXEC = 0x0040; int fstat(int, struct_stat *); int stat(char *, struct_stat *); } version(linux) { import std.c.linux.linux; }