Documentation

InMemory

Configuration routines

Tags
subpackage

InMemory

author

Dodonov A.A.

version

v.1.0 (2021/11/13)

copyright

Copyright (c) 2021, http://aeon.su

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

Return values
void

Search results