File
in package
implements
FileInterface
Uses
GetRelativePathTrait, NodeTrait, SymlinkTrait
An OO interface to a file
Directories, Files, Device entries etc are nodes This is not a manager though it has some operations. It represents a specific file to reason about, either present or absent
Interfaces, Classes, Traits and Enums
- FileInterface
- Directories, Files, Device entries etc are nodes
Table of Contents
- $path : AbsolutePathInterface
- $file : SplFileInfo
- __construct() : mixed
- createSymlinkAs() : bool
- delete() : mixed
- ensureFileExist() : FileInterface
- exists() : bool
- getAbsolutePath() : AbsolutePath
- getPathRelativeTo() : RelativePath
- isExecutable() : bool
- isLink() : bool
- isReadable() : bool
- isWriteable() : bool
- touch() : mixed
Properties
$path
protected
AbsolutePathInterface
$path
$file
private
SplFileInfo
$file
Methods
__construct()
public
__construct(AbsolutePathInterface $path) : mixed
Parameters
- $path : AbsolutePathInterface
Return values
mixed —createSymlinkAs()
public
createSymlinkAs() : bool
Return values
bool —delete()
public
delete() : mixed
Return values
mixed —ensureFileExist()
public
ensureFileExist() : FileInterface
Return values
FileInterface —exists()
public
exists() : bool
Return values
bool —getAbsolutePath()
public
getAbsolutePath() : AbsolutePath
Return values
AbsolutePath —getPathRelativeTo()
public
getPathRelativeTo(AbsolutePath $path) : RelativePath
Parameters
- $path : AbsolutePath
Return values
RelativePath —isExecutable()
public
isExecutable() : bool
Return values
bool —isLink()
public
isLink() : bool
Return values
bool —isReadable()
public
isReadable() : bool
Return values
bool —isWriteable()
public
isWriteable() : bool
Return values
bool —touch()
public
touch() : mixed