Core Function FileExists

From Sputnik Wiki
Jump to: navigation, search
FileExists( <file> )

Contents

Description

Check if a given file exists.

Parameters

file

File name.

Return Value

Success: Returns true.

Failure: Returns false.

Remarks

None.

Example

if( FileExists("sputnik.exe") )
{
	println("File does exist");
}
else
{
	println("File does NOT exist");
}

Alternative

if( -e "sputnik.exe" )
{
	println("File does exist");
}
else
{
	println("File does NOT exist");
}
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox