Hazaar\File
Dir
Summary
MethodsPropertiesConstants
No constants
Properties
$__media_uri
$__media_uri
$allow_hidden
$allow_hidden
$backend
$backend
$files
$files
$manager
$manager
$path
$path
$relative_path
$relative_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.

__construct()
__construct($path, $backend = null, $manager = null, $relative_path = null)
__toString()
__toString()
allow_hidden()
allow_hidden($toggle = true)
basename()
basename()
close()
close()
copyTo()
copyTo($target, $recursive = false, $transport_callback = null)
create()
create($recursive = false)
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).

dir()
dir($child)
dirname()
dirname()
download()
download($source_url, $timeout = 60) : \Hazaar\File
Download a file from a URL directly to the directory and return a new File object

This is useful for download large files as this method will write the file directly to storage. Currently, only local storage is supported as this uses OS file access.

exists()
exists()
find()
find($pattern, $show_hidden = false, $case_sensitive = true) : array
Find files in the current path optionally recursing into sub directories.
fixPath()
fixPath($path, $file = null)
fullpath()
fullpath($suffix = null)
get()
get($child, $force_dir = false)
get_meta()
get_meta($key = null)
isEmpty()
isEmpty()
is_readable()
is_readable()
is_writable()
is_writable()
media_uri()
media_uri($set_path = null)
mtime()
mtime()
path()
path($suffix = null)
put()
put($file) : mixed
Copy a file object into the current directory
read()
read($regex_filter = null)
realpath()
realpath($suffix = null)
rewind()
rewind()
size()
size()
toArray()
toArray()
type()
type()