[ Index ] |
|
Code source de Symfony 1.0.0 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 710 lignes (25 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
DirectoryScanner:: (27 méthodes):
matchPatternStart()
matchPath()
match()
setBasedir()
getBasedir()
setCaseSensitive()
setIncludes()
setExcludes()
scan()
slowScan()
listDir()
scandir()
isIncluded()
couldHoldIncluded()
isExcluded()
getIncludedFiles()
getNotIncludedFiles()
getExcludedFiles()
getDeselectedFiles()
getIncludedDirectories()
getNotIncludedDirectories()
getDeselectedDirectories()
getExcludedDirectories()
addDefaultExcludes()
setSelectors()
isEverythingIncluded()
isSelected()
Classe: DirectoryScanner - X-Ref
Class for scanning a directory for files/directories that match a certainmatchPatternStart($pattern, $str, $isCaseSensitive = true) X-Ref |
Does the path match the start of this pattern up to the first "**". This is a static mehtod and should always be called static This is not a general purpose test and should only be used if you can live with false positives. pattern=**\a and str=b will yield true. param: pattern the (non-null) pattern to match against param: str the (non-null) string (path) to match param: isCaseSensitive must matches be case sensitive? return: boolean true if matches, otherwise false |
matchPath($pattern, $str, $isCaseSensitive = true) X-Ref |
Matches a path against a pattern. Static param: pattern the (non-null) pattern to match against param: str the (non-null) string (path) to match param: isCaseSensitive must a case sensitive match be done? return: true when the pattern matches against the string. |
match($pattern, $str, $isCaseSensitive = true) X-Ref |
Matches a string against a pattern. The pattern contains two special characters: '*' which means zero or more characters, '?' which means one and only one character. param: pattern the (non-null) pattern to match against param: str the (non-null) string that must be matched against the return: boolean true when the string matches against the pattern, |
setBasedir($_basedir) X-Ref |
Sets the basedir for scanning. This is the directory that is scanned recursively. All '/' and '\' characters are replaced by DIRECTORY_SEPARATOR param: basedir the (non-null) basedir for scanning |
getBasedir() X-Ref |
Gets the basedir that is used for scanning. This is the directory that is scanned recursively. return: the basedir that is used for scanning |
setCaseSensitive($_isCaseSensitive) X-Ref |
Sets the case sensitivity of the file system param: specifies if the filesystem is case sensitive |
setIncludes($_includes = array() X-Ref |
Sets the set of include patterns to use. All '/' and '\' characters are replaced by DIRECTORY_SEPARATOR. So the separator used need not match DIRECTORY_SEPARATOR. When a pattern ends with a '/' or '\', "**" is appended. param: includes list of include patterns |
setExcludes($_excludes = array() X-Ref |
Sets the set of exclude patterns to use. All '/' and '\' characters are replaced by <code>File.separatorChar</code>. So the separator used need not match <code>File.separatorChar</code>. When a pattern ends with a '/' or '\', "**" is appended. param: excludes list of exclude patterns |
scan() X-Ref |
Scans the base directory for files that match at least one include pattern, and don't match any exclude patterns. |
slowScan() X-Ref |
Toplevel invocation for the scan. Returns immediately if a slow scan has already been requested. |
listDir($_dir) X-Ref |
Lists contens of a given directory and returns array with entries author: Albert Lash, alash@plateauinnovation.com param: src String. Source path and name file to copy. return: array directory entries |
scandir($_rootdir, $_vpath, $_fast) X-Ref |
Scans the passed dir for files and directories. Found files and directories are placed in their respective collections, based on the matching of includes and excludes. When a directory is found, it is scanned recursively. param: dir the directory to scan param: vpath the path relative to the basedir (needed to prevent |
isIncluded($_name) X-Ref |
Tests whether a name matches against at least one include pattern. param: name the name to match return: <code>true</code> when the name matches against at least one |
couldHoldIncluded($_name) X-Ref |
Tests whether a name matches the start of at least one include pattern. param: name the name to match return: <code>true</code> when the name matches against at least one |
isExcluded($_name) X-Ref |
Tests whether a name matches against at least one exclude pattern. param: name the name to match return: <code>true</code> when the name matches against at least one |
getIncludedFiles() X-Ref |
Get the names of the files that matched at least one of the include patterns, and matched none of the exclude patterns. The names are relative to the basedir. return: the names of the files |
getNotIncludedFiles() X-Ref |
Get the names of the files that matched at none of the include patterns. The names are relative to the basedir. return: the names of the files |
getExcludedFiles() X-Ref |
Get the names of the files that matched at least one of the include patterns, an matched also at least one of the exclude patterns. The names are relative to the basedir. return: the names of the files |
getDeselectedFiles() X-Ref |
<p>Returns the names of the files which were selected out and therefore not ultimately included.</p> <p>The names are relative to the base directory. This involves performing a slow scan if one has not already been completed.</p> return: the names of the files which were deselected. |
getIncludedDirectories() X-Ref |
Get the names of the directories that matched at least one of the include patterns, an matched none of the exclude patterns. The names are relative to the basedir. return: the names of the directories |
getNotIncludedDirectories() X-Ref |
Get the names of the directories that matched at none of the include patterns. The names are relative to the basedir. return: the names of the directories |
getDeselectedDirectories() X-Ref |
<p>Returns the names of the directories which were selected out and therefore not ultimately included.</p> <p>The names are relative to the base directory. This involves performing a slow scan if one has not already been completed.</p> return: the names of the directories which were deselected. |
getExcludedDirectories() X-Ref |
Get the names of the directories that matched at least one of the include patterns, an matched also at least one of the exclude patterns. The names are relative to the basedir. return: the names of the directories |
addDefaultExcludes() X-Ref |
Adds the array with default exclusions to the current exclusions set. |
setSelectors($selectors) X-Ref |
Sets the selectors that will select the filelist. param: selectors specifies the selectors to be invoked on a scan |
isEverythingIncluded() X-Ref |
Returns whether or not the scanner has included all the files or directories it has come across so far. return: <code>true</code> if all files and directories which have |
isSelected($name, $file) X-Ref |
Tests whether a name should be selected. param: string $name The filename to check for selecting. param: string $file The full file path. return: boolean False when the selectors says that the file |
Généré le : Fri Mar 16 22:42:14 2007 | par Balluche grâce à PHPXref 0.7 |