\File

Provides static methods for the creation, copying, deletion, moving, and opening of a single file, and aids in the creation of System.IO.FileStream objects.To browse the .NET Framework source code for this type, see the Reference Source.

Summary

Methods
Properties
Constants
WriteAllText()
ReadAllText()
ReadAllLines()
Exists()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

WriteAllText()

WriteAllText(  $path,   $contents,   $encoding = "Utf8") 

Parameters

$path
$contents
$encoding

ReadAllText()

ReadAllText(  $path,   $encoding = "Utf8") 

Opens a file, reads all lines of the file with the specified encoding, and then closes the file.

Parameters

$path
$encoding

ReadAllLines()

ReadAllLines(string  $path, string  $encoding = "Utf8") : array<mixed,string>

Parameters

string $path

The file path

string $encoding

The text file encoding name.

Returns

array<mixed,string>

Exists()

Exists(  $path) 

Parameters

$path