PHP Класс Pop\File\Dir

Автор: Nick Sagona, III ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$dirs boolean Flag to include base sub directory listings or just the files.
$files array The files within the directory
$full boolean Flag to store the full path.
$objects array The files within the directory as objects
$path string The directory path
$rec boolean Flag to dig recursively.
$tree array The nested tree map of the directory and its files

Открытые методы

Метод Описание
__construct ( string $dir, boolean $full = false, boolean $rec = false, boolean $dirs = true ) : Dir Constructor
emptyDir ( string $path = null, boolean $del = false ) : void Empty an entire directory.
getFiles ( ) : array Get the files.
getGroup ( ) : array Get the owner of the file. Works on POSIX file systems only
getObjects ( ) : array Get the files as objects.
getOwner ( ) : array Get the owner of the file. Works on POSIX file systems only
getPath ( ) : string Get the path.
getPermissions ( ) : string Get the permissions of the directory.
getSystemTemp ( ) : string Static method to return the system temp directory.
getTree ( ) : array Get the tree.
getUploadTemp ( ) : string Static method to return the upload temp directory.
getUser ( ) : array Get current user. Works on POSIX file systems only
isDir ( ) : boolean Is dir object.
isFile ( ) : boolean Is file object.
setPermissions ( integer $mode ) : Dir Change the permissions of the directory.

Защищенные методы

Метод Описание
buildTree ( DirectoryIterator $it ) : array Empty an entire directory.

Описание методов

__construct() публичный Метод

Instantiate a directory object
public __construct ( string $dir, boolean $full = false, boolean $rec = false, boolean $dirs = true ) : Dir
$dir string
$full boolean
$rec boolean
$dirs boolean
Результат Dir

buildTree() защищенный Метод

Empty an entire directory.
protected buildTree ( DirectoryIterator $it ) : array
$it DirectoryIterator
Результат array

emptyDir() публичный Метод

Empty an entire directory.
public emptyDir ( string $path = null, boolean $del = false ) : void
$path string
$del boolean
Результат void

getFiles() публичный Метод

Get the files.
public getFiles ( ) : array
Результат array

getGroup() публичный Метод

Get the owner of the file. Works on POSIX file systems only
public getGroup ( ) : array
Результат array

getObjects() публичный Метод

Get the files as objects.
public getObjects ( ) : array
Результат array

getOwner() публичный Метод

Get the owner of the file. Works on POSIX file systems only
public getOwner ( ) : array
Результат array

getPath() публичный Метод

Get the path.
public getPath ( ) : string
Результат string

getPermissions() публичный Метод

Get the permissions of the directory.
public getPermissions ( ) : string
Результат string

getSystemTemp() публичный статический Метод

Static method to return the system temp directory.
public static getSystemTemp ( ) : string
Результат string

getTree() публичный Метод

Get the tree.
public getTree ( ) : array
Результат array

getUploadTemp() публичный статический Метод

Static method to return the upload temp directory.
public static getUploadTemp ( ) : string
Результат string

getUser() публичный Метод

Get current user. Works on POSIX file systems only
public getUser ( ) : array
Результат array

isDir() публичный Метод

Is dir object.
public isDir ( ) : boolean
Результат boolean

isFile() публичный Метод

Is file object.
public isFile ( ) : boolean
Результат boolean

setPermissions() публичный Метод

Change the permissions of the directory.
public setPermissions ( integer $mode ) : Dir
$mode integer
Результат Dir

Описание свойств

$dirs защищенное свойство

Flag to include base sub directory listings or just the files.
protected bool $dirs
Результат boolean

$files защищенное свойство

The files within the directory
protected array $files
Результат array

$full защищенное свойство

Flag to store the full path.
protected bool $full
Результат boolean

$objects защищенное свойство

The files within the directory as objects
protected array $objects
Результат array

$path защищенное свойство

The directory path
protected string $path
Результат string

$rec защищенное свойство

Flag to dig recursively.
protected bool $rec
Результат boolean

$tree защищенное свойство

The nested tree map of the directory and its files
protected array $tree
Результат array