[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/class/file/finder/ -> filefinder.class.php (sommaire)

(pas de description)

Poids: 111 lignes (3 kb)
Inclus ou requis:0 fois
Référencé: 3 fois
Nécessite: 0 fichiers

Définit 1 class

FileFinder:: (5 méthodes):
  FileFinder()
  getKeyForFile()
  find()
  findBinary()
  getNew()


Classe: FileFinder  - X-Ref

\ingroup File

given an array with strings and a folder on disk, this class will scan the folder and compare
them with the ones in the array and return which ones from disk do NOT exist in the given array.
In order to get the array with the elements that are new according to our first array, please
use FileFinder::getNew()
FileFinder( $folder = '.' )   X-Ref
Pas de description

getKeyForFile( $fileName )   X-Ref
given a file, generates a key for it so that it can be checked whether
it really belongs to the $currentList array or not. This is useful in case of when we're
for example looking for new template files and we'd like to know whether locale_en_UK.php
is alreasdy in the list or not... This class can be extended to reimplement getKeyForFile
so that $this->getKeyForFile( "locale_en_UK.php" ) returns "en_UK" and so forth.
By default is returns the same name but if null is returned for a particular file, this
file will be ignored.

param: fileName tha name of the file
return: the key for the given file. If null is returned, this file will be ignored.

find( $currentList, $fileName = '*' )   X-Ref
uses Glob::glob() to find files that match the given format
and compares the file names against the ones already available

param: currentList
param: fileName

findBinary( $binary, $searchFolders )   X-Ref
Pas de description

getNew()   X-Ref
returns all the new items that are not in the list that was passed as a parameter to the
FileFinder::find() method

return: An array with the new items



Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics