Hatch Game Engine Documentation v1.4.0
The documentation for the Hatch Game Engine
Loading...
Searching...
No Matches
File Class Reference

Filesystem file manipulation. More...

Public Member Functions

boolean Exists (string path)
 Determines if the file at the path exists.
string ReadAllText (string path)
 Reads all text from the given filename.
boolean WriteAllText (string path, string text)
 Writes all text to the given filename.

Detailed Description

Filesystem file manipulation.

Member Function Documentation

◆ Exists()

boolean File.Exists ( string path)

Determines if the file at the path exists.

Parameters
pathThe path of the file to check for existence.
Returns
Returns whether the file exists.

◆ ReadAllText()

string File.ReadAllText ( string path)

Reads all text from the given filename.

Parameters
pathThe path of the file to read.
Returns
Returns all the text in the file as a string value if it can be read, otherwise it returns a null value if it cannot be read.

◆ WriteAllText()

boolean File.WriteAllText ( string path,
string text )

Writes all text to the given filename.

Parameters
pathThe path of the file to read.
textThe text to write to the file.
Returns
Returns whether the file was written successfully.