File.Exists
Skip to content
mnscript
bool File.Exists(string, string) 

Description ​

Returns whether the file exists in the directory.

Arguments ​

string - The directory to search.
string - The file to look for.

Returns ​

bool - True if file exists in the directory.

Example ​

msc
using File;
using Console;

// Finds whether "bf_password.exe" exists in "r/programs".

if(File.Exists("r/programs", "bf_password.exe")){
    Console.WriteLine("The file exists!");
}else{
    Console.WriteLine("The file does not exists!");
}