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

Class: File_Find

Source Location: /File_Find-1.2.1/Find.php

Class Overview


Commonly needed functions searching directory trees


Author(s):

Version:

  • $Id: Find.php,v 1.24 2006/02/02 13:04:59 tuupola Exp $

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 35]
Commonly needed functions searching directory trees
  • Author: Sterling Hughes <sterling@php.net>
  • Version: $Id: Find.php,v 1.24 2006/02/02 13:04:59 tuupola Exp $
  • Access: public


[ Top ]


Class Variables

$directories = array()

[line 53]

found dirs

Type:   array


[ Top ]

$files = array()

[line 47]

found files

Type:   array


[ Top ]



Method Detail

glob   [line 76]

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

Search the current directory to find matches for the the 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' or 'perl').

[ Top ]

isError   [line 273]

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 116]

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 172]

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 231]

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' or 'perl'.
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 Mon, 11 Mar 2019 14:36:00 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.