fileExists()

From Hack Wars Wiki

Jump to: navigation, search


Information for free function fileExists()
Function fileExists(string file)
API Attacking, Banking, FTP, Watch, HTTP
Description Returns a boolean indicating whether or not the file indicated exists.

Example

string file = "BasicAttack.bin";
string mes;
if ( fileExists( file ) == false ) {
	mes = "File " + file + " not found!" )
} else {
	mes = "File " + file + " found" )
}
message ( getSourceIP(), mes );

This example will test if the file "BasicAttack.bin" exists on a user's in-game hard disk and informs the user about the result. If this example is used in a HTTP script then change getSourceIP() to getHostIP().

Personal tools