File
[ class tree: File ] [ index: File ] [ all elements ]

Class: File_Find

Source Location: /File_Find-1.3.3/File/Find.php

Class Overview


Commonly needed functions searching directory trees


Author(s):

Version:

  • $Id$

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 37]
Commonly needed functions searching directory trees


[ Top ]


Class Variables

$directories = array()

[line 61]

found dirs

Type:   array


[ Top ]

$dirsep =  "/"

[line 49]

directory separator

Type:   string


[ Top ]

$files = array()

[line 55]

found files

Type:   array


[ Top ]



Method Detail

glob   [line 83]

array &glob( string $pattern, string $dirpath, [string $pattern_type = 'php'])

Search specified directory to find matches for specified pattern
  • Return: containing all of the files and directories matching the pattern or null if no matches
  • Author: Sterling Hughes <sterling@php.net>
  • Access: public

Parameters:

string   $pattern   —  a string containing the pattern to search the directory for.
string   $dirpath   —  a string containing the directory path to search.
string   $pattern_type   —  a string containing the type of pattern matching functions to use (can either be 'php', 'perl' or 'shell').

[ Top ]

isError   [line 293]

boolean isError( &$var, object PEAR_Error $var)

Determine whether or not a variable is a PEAR error
  • Return: returns true if the variable is a PEAR error, otherwise it returns false.
  • Access: public

Parameters:

object PEAR_Error   $var   —  the variable to test.
   &$var   — 

[ Top ]

maptree   [line 129]

array &maptree( string $directory)

Map the directory tree given by the directory_path parameter.
  • Return: a two element array, the first element containing a list of all the directories, the second element containing a list of all the files.
  • Author: Sterling Hughes <sterling@php.net>
  • Access: public

Parameters:

string   $directory   —  contains the directory path that you want to map.

[ Top ]

mapTreeMultiple   [line 186]

array &mapTreeMultiple( string $directory, [integer $maxrecursion = 0], [ $count = 0])

Map the directory tree given by the directory parameter.
  • Return:

    a multidimensional array containing all subdirectories and their files. For example:

    Array ( [0] => file_1.php [1] => file_2.php [subdirname] => Array ( [0] => file_1.php ) )

  • Author: Mika Tuupola <tuupola@appelsiini.net>
  • Access: public

Parameters:

string   $directory   —  contains the directory path that you want to map.
integer   $maxrecursion   —  maximun number of folders to recursive map
   $count   — 

[ Top ]

search   [line 248]

array &search( string $pattern, string $directory, [string $type = 'php'], [bool $fullpath = true], [string $match = 'files'])

Search the specified directory tree with the specified pattern. Return an array containing all matching files (no directories included).
  • Return: a list of files matching the pattern parameter in the the directory path specified by the directory parameter
  • Author: Sterling Hughes <sterling@php.net>
  • Access: public

Parameters:

string   $pattern   —  the pattern to match every file with.
string   $directory   —  the directory tree to search in.
string   $type   —  the type of regular expression support to use, either 'php', 'perl' or 'shell'.
bool   $fullpath   —  whether the regex should be matched against the full path or only against the filename
string   $match   —  can be either 'files', 'dirs' or 'both' to specify the kind of list to return

[ Top ]


Documentation generated on Wed, 09 Dec 2015 23:08:06 +0000 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.