Documentation

Layer
in package

Configuration routines

Tags
subpackage

Fs

author

Dodonov A.A.

version

v.1.0 (2021/11/13)

copyright

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

Table of Contents

$createdDirectories  : array<string|int, array<string|int, mixed>>
List of the created directories.
$existingFiles  : array<string|int, string>
List of existring files
clearCreatedDirectoriesInfo()  : void
Method clears info about the created directories
createDirectory()  : bool
Creating folders on the disc
directoryExists()  : bool
Checking if the directory exists
existingFileGetContents()  : string
Reading existing file from disc
fileExists()  : bool
Checking if the file exists
fileGetContents()  : string|bool
Reading file from disc
filePutContents()  : int
Saving data on the disc
getCreatedDirectoryInfo()  : array<string|int, mixed>
Method returns data from the self::$createdDirectories array

Properties

$createdDirectories

List of the created directories.

public static array<string|int, array<string|int, mixed>> $createdDirectories = []

Filled only if the Conf::getConfigValueAsString('fs/layer', 'real') !== 'real'

$existingFiles

List of existring files

public static array<string|int, string> $existingFiles = []

Methods

clearCreatedDirectoriesInfo()

Method clears info about the created directories

public static clearCreatedDirectoriesInfo() : void
Return values
void

createDirectory()

Creating folders on the disc

public static createDirectory(string $filePath[, int $mode = 0777 ][, bool $recursive = false ]) : bool
Parameters
$filePath : string

path to the file

$mode : int = 0777

access setting to the creating directory

$recursive : bool = false

use recursive directories

Return values
bool

true on success, false on error

directoryExists()

Checking if the directory exists

public static directoryExists(string $dirPath) : bool
Parameters
$dirPath : string

path to the checking directory

Return values
bool

true if the directory exists, false otherwise

existingFileGetContents()

Reading existing 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 if the file exists

public static fileExists(string $filePath) : bool
Parameters
$filePath : string

path to the checking file

Return values
bool

true if the file exists, 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 on the disc

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

getCreatedDirectoryInfo()

Method returns data from the self::$createdDirectories array

public static getCreatedDirectoryInfo(int $i) : array<string|int, mixed>
Parameters
$i : int

key of the element

Return values
array<string|int, mixed>

created directoru info

Search results

    Яндекс.Метрика