InMemory
in package
Configuration routines
Tags
Table of Contents
- $fs : array<string, string>
- In memory FS
- clearFs() : void
- Method clears file system
- existingFileGetContents() : string
- Reading file from disc
- fileExists() : bool
- Checking that the file exist
- fileGetContents() : string|bool
- Reading file from disc
- filePutContents() : int
- Saving data file
- preloadFile() : void
- Method preloads real file into in memory FS
Properties
$fs
In memory FS
private
static array<string, string>
$fs
= []
Methods
clearFs()
Method clears file system
public
static clearFs() : void
Return values
void —existingFileGetContents()
Reading file from disc
public
static existingFileGetContents(string $filePath) : string
Parameters
- $filePath : string
-
path to the file to be read
Return values
string —read data or false in case of error
fileExists()
Checking that the file exist
public
static fileExists(string $filePath) : bool
Parameters
- $filePath : string
-
path to the checking file
Return values
bool —true if the file esxists, false otherwise
fileGetContents()
Reading file from disc
public
static fileGetContents(string $filePath) : string|bool
Parameters
- $filePath : string
-
path to the file to be read
Return values
string|bool —read data or false in case of error
filePutContents()
Saving data file
public
static filePutContents(string $filePath, string $data, int $flags) : int
Parameters
- $filePath : string
-
path to the file
- $data : string
-
saving data
- $flags : int
-
flags
Return values
int —result
preloadFile()
Method preloads real file into in memory FS
public
static preloadFile(string $filePath) : void
Parameters
- $filePath : string
-
path to the loading file