class FileSystemUtils

Class FileSystemUtils

Methods

static bool
rrmdir(string $path)

Recursively removes a folder along with all its files and directories

static bool
mkdir(string $dir, int $mode = 0777, bool $recursive = false)

Attempts to create the directory specified by pathname.

static SplFileInfo[]
scandir(string $path)

List files and directories inside the specified path.

static ?string
locate(string $subfolder, string $file, bool $fqcn = true)

Locate a file in a subfolder, returning the FQCN or filepath.

Details

at line 27
static bool rrmdir(string $path)

Recursively removes a folder along with all its files and directories

Parameters

string $path

Return Value

bool

at line 55
static bool mkdir(string $dir, int $mode = 0777, bool $recursive = false)

Attempts to create the directory specified by pathname.

Parameters

string $dir
int $mode
bool $recursive

Return Value

bool

at line 67
static SplFileInfo[] scandir(string $path)

List files and directories inside the specified path.

Parameters

string $path

Return Value

SplFileInfo[]

at line 92
static ?string locate(string $subfolder, string $file, bool $fqcn = true)

Locate a file in a subfolder, returning the FQCN or filepath.

The active modules of the last activated are traversed to the first, and finally the core. The file is searched in the subfolder specified (for example Models). If true (default), return the FQCN; if false, return the path to the file

Parameters

string $subfolder
string $file
bool $fqcn

Return Value

?string