forlano Messages: 1185 Registered: March 2006 Location: Italy
Senior Contributor
fudadmin wrote on Sat, 24 June 2006 16:42
maybe this?
bool FileExists(const char *name)
Maybe yes. But I wonder what I must use if I want to use the same pointer "in" to perform this operation after the file opening. What is the difference between in.IsOK() and in.IsError()?
FileIn in(...);
if(in) {
// in was succesfuly opened
}
Actually, IsError is usually used at the end of write operation to find out whether always was written OK (e.g. there is enough capacity on target media, like:
FileOut out(...);
if(out) {
...write the stuff
if(out.IsError())
Exclamation("Error writing the file !");
}