POV-Ray : Newsgroups : povray.general : Determine if File Exists? : Re: Determine if File Exists? Server Time
2 Jun 2024 19:46:16 EDT (-0400)
  Re: Determine if File Exists?  
From: Slime
Date: 7 Sep 2004 15:58:56
Message: <413e1300$1@news.povray.org>
> How would you determine if a file exists? The docs list
> #fopen/read/write/fclose, but not any other file IO functions. Is this
> possible with POVRay?

From "3.2.2.3.1  The #fopen Directive": You may use #ifdef
FILE_HANDLE_IDENTIFIER to see if a file is open.

So I think using #fopen to open the file, and then using #ifdef on the file
handle identifier will check if the file exists.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.