\Hazaar\File
Dir
Summary
Methods Properties Constants
dir
get
put
No constants
Properties
$allow_hidden
$allow_hidden
$backend
$backend
$files
$files
$manager
$manager
$path
$path
Methods
()
($include_hidden = false) : boolean
Empty a directory of all it's contents.

This is the same as calling delete(true) except that the directory itself is not deleted.

By default hidden files are not deleted. This is for protection. You can choose to delete them as well by setting $include_hidden to true.

Parameters

$include_hiddenmixed

Also delete hidden files.

Returns

boolean
__construct()
__construct($path, $backend = null, $manager = null)

Parameters

$path

No description

$backend\Hazaar\File\Backend\_Interface

No description

$manager\Hazaar\File\Manager

No description

__toString()
__toString()
allow_hidden()
allow_hidden($toggle = true)

Parameters

$toggle

No description

close()
close()
copyTo()
copyTo($target, $recursive = false, $transport_callback = null)

Parameters

$target

No description

$recursive

No description

$transport_callback

No description

create()
create($recursive = false)

Parameters

$recursive

No description

delete()
delete($recursive = false) : mixed
Delete the directory, optionally removing all it's contents.

Executing this method will simply delete or “unlink” the directory. Normally it must be empty to succeed. However specifying the $recursive parameter as TRUE will delete everything inside the directory, recursively (obviously).

Parameters

$recursivemixed

No description

Returns

mixed
dir()
dir($child)

Parameters

$child

No description

exists()
exists()
find()
find($pattern, $show_hidden = false, $case_sensitive = true, $start = null) : array
Find files in the current path optionally recursing into sub directories.

Parameters

$patternstring

The pattern to match against. This can be either a wildcard string, such as “*.txt” or a regex pattern. Regex is detected if the string is longer than a single character and first character is the same as the last.

$show_hidden

No description

$case_sensitive\Hazaar\File\bool

If TRUE character case will be honoured.

$startstring

String path to start at if the search should start at a sub directory.

Returns

array

Returns an array of matches files.

fixPath()
fixPath($path, $file = null)

Parameters

$path

No description

$file

No description

get()
get($child)

Parameters

$child

No description

isEmpty()
isEmpty()
is_readable()
is_readable()
is_writable()
is_writable()
path()
path($suffix = null)

Parameters

$suffix

No description

put()
put($file) : mixed
Copy a file object into the current directory

Parameters

$file\Hazaar\File

The file to put in this directory

Returns

mixed
read()
read($regex_filter = null)

Parameters

$regex_filter

No description

realpath()
realpath($suffix = null)

Parameters

$suffix

No description

rewind()
rewind()
toArray()
toArray()