delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/20/20:45:09

Date: Mon, 20 Oct 1997 17:43:05 -0700 (PDT)
Message-Id: <199710210043.RAA15253@adit.ap.net>
Mime-Version: 1.0
To: "H. Anthony Hoyt" <hahoyt AT eng2 DOT uconn DOT edu>,
DJGPP Mailing List <djgpp AT delorie DOT com>
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Checking to see if I file exists

At 02:18  10/20/1997 -0400, H. Anthony Hoyt wrote:
>     I can't seem to remember how to check to see if I file exists or not.
>What I want is, if the user enters in a file name, to check to see if the
>file exists.  If so, I want to open the file, not overwrite it, read from
>the file then recreate the file before I finaly save the file.  (All in
>binary)  Any advice would be welcome.  Thanks
Try the very confusingly :) named function __file_exists(). If you want to
be portable, use access() or stat().

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019