class Tool

Filesystem tool class.

Properties

static boolean $test
static boolean $ret_is_file
static boolean $ret_is_writable
static mixed $ret_file_get_content Return value of filegetcontent (only for unit testing)
static mixed $ret_file_put_content Return value of fileputcontent (only for unit testing)

Methods

static mixed
file_get_contents(string $filename, boolean $use_include_path = false, resource $context = null, integer $offset = -1, integer $maxlen = null)

This method is a wrapper for the native filegetcontents function.

static mixed
file_put_contents(string $filename, mixed $data = null, integer $flags, resource $context = null)

This method is a wrapper for the native fileputcontent function.

static bool
is_file(string $filename)

This method is a wrapper for the native is_file function.

static bool
is_writable(string $file)

This method is a wrapper for the native is_writable function.

Details

at line 59
static mixed file_get_contents(string $filename, boolean $use_include_path = false, resource $context = null, integer $offset = -1, integer $maxlen = null)

This method is a wrapper for the native filegetcontents function.

Parameters

string $filename
boolean $use_include_path
resource $context
integer $offset
integer $maxlen

Return Value

mixed

See also

file_get_contents()

at line 82
static mixed file_put_contents(string $filename, mixed $data = null, integer $flags, resource $context = null)

This method is a wrapper for the native fileputcontent function.

Parameters

string $filename
mixed $data
integer $flags
resource $context

Return Value

mixed

See also

file_put_contents()

at line 96
static bool is_file(string $filename)

This method is a wrapper for the native is_file function.

Parameters

string $filename

Return Value

bool

at line 110
static bool is_writable(string $file)

This method is a wrapper for the native is_writable function.

Parameters

string $file

Return Value

bool