YANA 4 PHP Framework
Docs For Class DirStream
Manipulate a directory
This class represents a directory. You may use this to get a list of contents, or remove, or create a directory.
Located in /includes/class_dirstream.php
SerializeableObject | --InputStream | --DirStream
create this directory
Tries to create the directory. Check the developer's cookbook for an example to this function.
Name | Type | Description |
---|---|---|
$mode | int | access mode |
remove this directory
By option you may choose to also recursivly remove all files and subdirectories inside. Otherwise the directory will only be removed if it is empty.
Name | Type | Description |
---|---|---|
$is_recursive | boolean | triggers wether to remove directories even if they are not empty, default = false |
list contents of a directory
The argument $filter may contain multiple file extension, use a pipe '|' sign to seperate them. Example: "*.xml|*.html" will find all xml- and html-files
Name | Type | Description |
---|---|---|
$filter | string |
check if directory exists and is readable
return list of files within the directory
NOTE: will only return filenames with the path stripped
check wether the directory has no contents
Returns bool(true) if there are no files that match the current filter and bool(true) if there is at least 1 file that matches.
length
read contents and put results in cache (filter settings will be applied)
Inherited From InputStream
InputStream::InputStream()
InputStream::exists()
InputStream::get()
InputStream::getFilename()
InputStream::isEmpty()
InputStream::read()
InputStream::resetStats()
InputStream::toString()
Inherited From SerializeableObject
SerializeableObject::serialize()
SerializeableObject::toString()
Documentation generated on Sat, 16 Sep 2006 17:05:57 +0200 by phpDocumentor 1.3.0RC4