API > eden > folder.php
View Source

class Eden_Folder

This is an abstract definition of common folder manipulation listing and information per folder.

Public Methods

public function create($chmod = 0755)

Creates a folder given the path

Arguments

  1. int chmod

Returns this

public function getFiles($regex = NULL, $recursive = false)

Returns a list of files given the path and optionally the pattern

Arguments

  1. string regular expression

Returns array

public function getFolders($regex = NULL, $recursive = false)

Returns a list of folders given the path and optionally the regular expression

Arguments

  1. string regular expression

Returns array

public function getName()

Returns the name of the directory.. just the name

Returns string the name

public function isFile()

Checks to see if this path is a real file

Returns bool

public function isFolder($path = NULL)

Checks to see if this path is a real file

Returns bool

public function remove()

Removes a folder given the path

Returns this

public function removeFiles($regex = NULL)

Removes files given the path and optionally a regular expression

Arguments

  1. string regular expression

Returns bool

public function removeFolders($regex = NULL)

Removes a folder given the path and optionally the regular expression

Arguments

  1. string regular expression

Returns bool

public function truncate()

Removes files and folder given a path

Returns this

class Eden_Folder_Error

Folder Errors


© 2012 Openovate Labs. All rights reserved.