/* compile: cl stattest.c */ #include #include void print_ino (char *target) { struct stat statbuf; if (stat (target, &statbuf) == 0) printf ("%s: %d\n", target, statbuf.st_ino); else printf ("%s: stat failed\n", target); } int main (void) { print_ino ("stattest.c"); print_ino ("stattest.exe"); print_ino ("."); print_ino (".."); print_ino ("C:\\"); print_ino ("C:\\WINNT"); print_ino ("nonexist"); return 0; }