Filesystem
in package
Table of Contents
Methods
- copyDir() : array<string|int, mixed>
- Copy a directory
- getFiles() : array<string|int, mixed>
- Return array with file names
- getFilesCount() : int
- Count files from directory
- sanitizeFileName() : string
- Sanitize a file name
Methods
copyDir()
Copy a directory
public
copyDir(string $src, string $dest[, bool $delete = false ]) : array<string|int, mixed>
Parameters
- $src : string
-
Source directory
- $dest : string
-
Destination directory
- $delete : bool = false
-
Flag whether to first delete all files in destination dir
Tags
Return values
array<string|int, mixed>getFiles()
Return array with file names
public
getFiles(string $dir) : array<string|int, mixed>
Parameters
- $dir : string
Tags
Return values
array<string|int, mixed>getFilesCount()
Count files from directory
public
getFilesCount(string $dir) : int
Parameters
- $dir : string
Tags
Return values
intsanitizeFileName()
Sanitize a file name
public
sanitizeFileName(string $name[, bool $allowEmptyParts = false ]) : string
Parameters
- $name : string
- $allowEmptyParts : bool = false