I think that everything that exists should return a non-zero result from file_stat. I have nothing against putting in methods in the stat object to differentiate between what we do know and what we don't. Let zero_type(st->mtime) be true?
/ Martin Nilsson (saturator)
Previous text:
2004-02-12 22:53: Subject: NT problem.
There are already other pecularities between NT and Unix file systems that require similar preprocessor stuff. The Stdio API should only try to hide such things as far as can be done without producing false pretenses. Returning nonzero if the drive letter exists is not disinformation, but putting arbitrary timestamps etc into a Stat struct is.
As for your example, you should use Stdio.is_dir instead. Stdio.exist and Stdio.is_dir should return nonzero in that case and I also consider it a bug that they don't.
/ Martin Stjernholm, Roxen IS