[ Index ]
 

Code source de PHP PEAR 1.4.5

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/PEAR/PackageFileManager/ -> File.php (sommaire)

Retrieve the files from a directory listing

Poids: 421 lignes (16 kb)
Inclus ou requis: 4 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

PEAR_PackageFileManager_File:: (11 méthodes):
  PEAR_PackageFileManager_File()
  getFileList()
  dirList()
  _testFile()
  _checkIgnore()
  _setupIgnore()
  _getRegExpableSearchString()
  _setupDirs()
  _setDir()
  sortfiles()
  mystrucsort()


Classe: PEAR_PackageFileManager_File  - X-Ref

Retrieve the files from a directory listing

This class is used to retrieve a raw directory
listing.  Use the {@link PEAR_PackageFileManager_CVS}
class to only retrieve the contents of a cvs
repository when generating the package.xml
PEAR_PackageFileManager_File(&$parent, $options)   X-Ref
Set up the File filelist generator

'ignore' and 'include' are the only options that this class uses.  See
{@link PEAR_PackageFileManager::setOptions()} for
more information and formatting of this option
param: PEAR_PackageFileManager
param: array

getFileList()   X-Ref
Generate the <filelist></filelist> section
of the package file.

This function performs the backend generation of the array
containing all files in this package
return: array

dirList($directory)   X-Ref
Retrieve a listing of every file in $directory and
all subdirectories.

The return format is an array of full paths to files
param: string $directory full path to the directory you want the list of
return: array list of files in a directory

_testFile($directory, $entry)   X-Ref
Test whether an entry should be processed.

Normally, it ignores all files and directories that begin with "."  addhiddenfiles option
instead only ignores "." and ".." entries
param: string directory name of entry
param: string name

_checkIgnore($file, $path, $return = 1)   X-Ref
Tell whether to ignore a file or a directory
allows * and ? wildcards

param: string  $file    just the file name of the file or directory,
param: string  $path    the full path
param: 1|0    $return  value to return if regexp matches.  Set this to
return: bool    true if $path should be ignored, false if it should not

_setupIgnore($ignore, $index)   X-Ref
Construct the {@link $ignore} array

param: array strings of files/paths/wildcards to ignore
param: 0|1 0 = files to include, 1 = files to ignore

_getRegExpableSearchString($s)   X-Ref
Converts $s into a string that can be used with preg_match

param: string $s string with wildcards ? and *
return: string converts * to .*, ? to ., etc.

_setupDirs($struc, $dir, $contents)   X-Ref
Recursively move contents of $struc into associative array

The contents of $struc have many indexes like 'dir/subdir/subdir2'.
This function converts them to
array('dir' => array('subdir' => array('subdir2')))
param: array struc is array('dir' => array of files in dir,
param: array array form of 'dir/subdir/subdir2' array('dir','subdir','subdir2')
return: array same as struc but with array('dir' =>

_setDir($dir, $contents)   X-Ref
Recursively add all the subdirectories of $contents to $dir without erasing anything in
$dir

param: array
param: array
return: array processed $dir

sortfiles($a, $b)   X-Ref
Pas de description

mystrucsort($a, $b)   X-Ref
Pas de description



Généré le : Sun Feb 25 14:08:00 2007 par Balluche grâce à PHPXref 0.7