Documentation

Filesystem extends Component
in package

FinalYes
Tags
author

Ramone Burrell ramone@ramoneburrell.com

since

Version 0.1.0

Table of Contents

Properties

$hashCode  : int
$hashCounter  : int

Methods

__call()  : mixed
__callStatic()  : mixed
__construct()  : mixed
__destruct()  : mixed
__get()  : mixed
chmod()  : bool
create()  : bool
Writes a string to a file. This method will force the flag LOCK_EX onto the $flags arguments passed.
exists()  : bool
extends()  : bool
extFromDataURI()  : string
getContents()  : string
getModifiedDateTime()  : DateTime
getReflection()  : ReflectionClass
glob()  : mixed
makeDirectory()  : mixed
putContents()  : bool
unlink()  : bool
init()  : mixed

Properties

Methods

__callStatic()

public static __callStatic(mixed $method, array<string|int, mixed> $arguments) : mixed
Parameters
$method : mixed
$arguments : array<string|int, mixed>

__get()

public __get(string $property) : mixed
Parameters
$property : string

create()

Writes a string to a file. This method will force the flag LOCK_EX onto the $flags arguments passed.

public static create(string $filepath[, string|array<string|int, mixed>|resource $data = '' ][, int|null $flags = null ][, int|null $mode = null ]) : bool
Parameters
$filepath : string

A relative or absolute path to the file to write to

$data : string|array<string|int, mixed>|resource = ''

The data to write to the file

$flags : int|null = null

The flags to use in writing to the file. The list of acceptable flags are FILE_USE_INCLUDE_PATH, FILE_APPEND and LOCK_EX

$mode : int|null = null

The mode the file should be changed to after creation, null if the mode should not be changed

Tags
throws
Exception

Throws a FilesystemException if the file already exists or if there was an error creating the physical file

Return values
bool

exists()

public static exists(string $filename) : bool
Parameters
$filename : string
Return values
bool

extends()

public extends(ReflectionClass $reflector) : bool
Parameters
$reflector : ReflectionClass
Return values
bool

getReflection()

public getReflection() : ReflectionClass
Return values
ReflectionClass

putContents()

public static putContents(string $filepath, string $contents[, number $flags = null ]) : bool
Parameters
$filepath : string
$contents : string
$flags : number = null
Tags
see
file_put_contents()
throws
IllegalargumentException
throws
Exception
Return values
bool
public static unlink(string $filepath) : bool
Parameters
$filepath : string
Return values
bool

        
On this page

Search results