Filesystem


Class: \Flextype\Component\Filesystem\Filesystem

Visibility Function
public static copy(\string $path, \string $newpath, \boolean $recursive=false) : bool True on success, false on failure.
Copy a file(s).
public static createDir(\string $dirname, \string $visibility='public') : bool True on success, false on failure.
Create a directory.
public static delete(\string $path) : bool True on success, false on failure.
Delete a file.
public static deleteDir(\string $dirname) : bool True on success, false on failure.
Delete a directory.
public static getDirTimestamp(\string $directory) : int directory timestamp
Get directory timestamp
public static getMetadata(\string $path) : array/false The file metadata or false on failure.
Get a file's metadata.
public static getMimeType(\string $file, \boolean $guess=true) : mixed
Returns the mime type of a file. Returns false if the mime type is not found.
public static getSize(\string $path) : int/false The file size or false on failure.
Get a file's size.
public static getTimestamp(\string $path) : string/false The timestamp or false on failure.
Get a file's timestamp.
public static getVisibility(\string $path) : string/false The visibility (public/private) or false on failure.
Get a file's visibility.
public static has(\string $path) : bool
Check whether a file exists.
public static listContents(\string $directory='', \boolean $recursive=false) : array A list of file metadata.
List contents of a directory.
public static read(\string $path) : string/false The file contents or false on failure.
Read a file.
public static rename(\string $path, \string $newpath) : bool True on success, false on failure.
Rename a file.
public static setVisibility(\string $path, \string $visibility) : bool True on success, false on failure.
Set the visibility for a file.
public static write(\string $path, \string $contents, \string $visibility='public', \integer $flags=2) : bool True on success, false on failure.
Write a file.
protected static getDirectoryIterator(\string $path) : mixed
protected static getFilePath(\SplFileInfo $file) : mixed
Get the normalized path from a SplFileInfo object.
protected static getRecursiveDirectoryIterator(\string $path, \integer $mode=1) : mixed
protected static mapFileInfo(\SplFileInfo $file) : array
protected static normalizeFileInfo(\SplFileInfo $file) : array/void
Normalize the file info.
Language: en, ru