Hi,
I tried the folowing:
int FileExists(string fname) {
ifstream fs; // create an in file-stream object
fs.open(fname.c_str(), ios::in); // try opening the file we look for
// if the file doesnt exist, fs will be
// NULL, therefore it doesnt exist
if (!fs) {
fs.close();
return 0; // the file does no exist
} else {
// now the file does exists, so return t
// he appropriate value
fs.close();
return 1; // the file does exist
}
}
I updated a lot, but it just checks for files on the SERVER.
How come? I want to check for a file on the client.
Also I tried: 'execclient', this doesn't work.
Anyone suggestions to this code?
Thanks,
Frank 'anxiro' weima.
-----Oorspronkelijk bericht-----
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens [EMAIL PROTECTED]
Verzonden: dinsdag 25 januari 2005 21:26
Aan: [email protected]
Onderwerp: Re: [hlcoders] Check if a file or folder exists at Client
Frank Weima wrote:
> This is a multi-part message in MIME format.
> --
> [ Picked text/plain from multipart/alternative ]
> Is this possible in C++?
>
>
>
> Tnx,
>
> Frank.
>
Yes, using a client-plugin as well, ofcourse.
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders