[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
PrologExistFile
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
PrologExistFile
(Prolog) existfile
File I/O predicate that succeeds if the file exists.
goal
existsfile("Test.txt").
Example
DOMAINS
FILE = myFile
goal
openwrite(myFile,"Test.txt"),
writedevice(myFile),
write("My first Prolog file output!\n"),
writedevice(stdout),
existfile("Test.txt"),
closefile(myFile),
deletefile("Test.txt"),
write("Should get here"),nl,
existfile("Test.txt"),
write("Should NOT get here").
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
