Mail Archives: djgpp/1997/08/23/17:35:04
Peter J. Farley III <pjfarley AT dorsai DOT org> wrote:
> Perusing the DJGPP libc sources, it seems to me that access(filename,
> R_OK) will give you the results that you want, without the overhead of
> an fopen and an fclose. Just call:
> access("filename.ext", R_OK)
> Zero return value means the file is available for reading, which
> implies that it actually exists. So this code should work:
<snip>
Keep in mind, however, that access() does not work for device files like
"prn" and "nul", with or without the colon. Network files may not work
either, I can't recall.
late\fw
- Raw text -