www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/26/12:46:23

From: Thomas Demmer <demmer AT LSTM DOT Ruhr-UNI-Bochum DOT De>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: checking for file existence
Date: Sun, 26 Apr 1998 17:54:13 +0200
Organization: Lehrstuhl fuer Stroemungsmechanik
Lines: 25
Message-ID: <354358A5.7AA3BDEE@LSTM.Ruhr-UNI-Bochum.De>
References: <6hv7er$5l4$1 AT camel29 DOT mindspring DOT com>
NNTP-Posting-Host: bvb.lstm.ruhr-uni-bochum.de
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Eric wrote:
> 
> Is there a way to check whether or not a file exists without actually
> opening it?
> 
> I have my fopen in a separate encapsulated function. What I want to
> accomplish is the ability to check if a user request for creating a new file
> is on a file that already exists, and if so, provide the option to overwrite
> it (which the encapsulated fopen will do if called).
Try
 info libc alpha stat
-- 
Ciao
Tom

*************************************************************
* Thomas Demmer                                             *
* Lehrstuhl fuer Stroemungsmechanik                         *
* Ruhr-Uni-Bochum                                           *
* Universitaetsstr. 150                                     *
* D-44780  Bochum                                           *
* Tel: +49 234 700 6434                                     *
* Fax: +49 234 709 4162                                     *
* http://www.lstm.ruhr-uni-bochum.de/~demmer                *
*************************************************************

- Raw text -


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