Class MOXMAN_Vfs_BasicFileFilter
Inheritance | MOXMAN_Vfs_BasicFileFilter |
---|---|
Implements | MOXMAN_Vfs_IFileFilter |
This class provides basic file filtering logic.
Public Methods
Method | Description | Defined By |
---|---|---|
accept() | Returns true or false if the file is accepted or not. | MOXMAN_Vfs_BasicFileFilter |
createFromConfig() | Creates a config instance from the specified config. It will use various config options for setting up a filter instance. This is a helper function. | MOXMAN_Vfs_BasicFileFilter |
getIncludeExtensions() | Gets a comma separated list of valid file extensions or empty string if all are accepted. | MOXMAN_Vfs_BasicFileFilter |
getIncludeWildcardPattern() | MOXMAN_Vfs_BasicFileFilter | |
isEmpty() | Returns true/false if the filter is empty or not. | MOXMAN_Vfs_BasicFileFilter |
setExcludeDirectoryPattern() | Sets a regexp pattern that is used to deny directory path parts. | MOXMAN_Vfs_BasicFileFilter |
setExcludeFilePattern() | Sets a regexp pattern that is used to deny files path parts. | MOXMAN_Vfs_BasicFileFilter |
setExcludeFiles() | Sets comma separated string list of filenames to exclude. | MOXMAN_Vfs_BasicFileFilter |
setExcludeWildcardPattern() | Sets a wildcard pattern that is used to deny files path parts. | MOXMAN_Vfs_BasicFileFilter |
setIncludeDirectoryPattern() | Sets a regexp pattern that is used to accept directory path parts. | MOXMAN_Vfs_BasicFileFilter |
setIncludeExtensions() | Sets a comma separated list of valid file extensions. | MOXMAN_Vfs_BasicFileFilter |
setIncludeFilePattern() | Sets a regexp pattern that is used to accept files path parts. | MOXMAN_Vfs_BasicFileFilter |
setIncludeWildcardPattern() | Sets a wildcard pattern that is used to accept files path parts. | MOXMAN_Vfs_BasicFileFilter |
setOnlyDirs() | Sets if only dirs are to be accepted in result. | MOXMAN_Vfs_BasicFileFilter |
setOnlyFiles() | Sets if only files are to be accepted in result. | MOXMAN_Vfs_BasicFileFilter |
Method Details
Returns true or false if the file is accepted or not.
public Boolean accept ( MOXMAN_Vfs_IFile $file, $isFile = true ) | ||
$file | MOXMAN_Vfs_IFile | File to grant or deny. |
$isFile | Boolean | Default state if the filter is on an non existing file. |
return | Boolean | True/false if the file is accepted or not. |
---|
Creates a config instance from the specified config. It will use various config options for setting up a filter instance. This is a helper function.
public static MOXMAN_Vfs_BasicFileFilter createFromConfig ( MOXMAN_Util_Config $config, $prefix = "filesystem" ) | ||
$config | MOXMAN_Util_Config | Config instance to get settings from. |
$prefix | String | Optional config prefix defaults to filesystem. |
return | MOXMAN_Vfs_BasicFileFilter | Basic file filter instance based on config. |
---|
Gets a comma separated list of valid file extensions or empty string if all are accepted.
public string getIncludeExtensions ( ) | ||
return | string | Comma separated list of valid file extensions. |
---|
public void getIncludeWildcardPattern ( ) |
Returns true/false if the filter is empty or not.
public boolean isEmpty ( ) | ||
return | boolean | True/false if the filter is empty or not. |
---|
Sets a regexp pattern that is used to deny directory path parts.
public void setExcludeDirectoryPattern ( $pattern ) | ||
$pattern | string | Regexp pattern that is used to deny directory path parts. |
Sets a regexp pattern that is used to deny files path parts.
public void setExcludeFilePattern ( $pattern ) | ||
$pattern | string | Regexp pattern that is used to deny files path parts. |
Sets comma separated string list of filenames to exclude.
public void setExcludeFiles ( $files ) | ||
$files | string | Separated string list of filenames to exclude. |
Sets a wildcard pattern that is used to deny files path parts.
public void setExcludeWildcardPattern ( $pattern ) | ||
$pattern | string | Wildcard pattern that is used to deny files path parts. |
Sets a regexp pattern that is used to accept directory path parts.
public void setIncludeDirectoryPattern ( $pattern ) | ||
$pattern | string | Regexp pattern that is used to accept directory path parts. |
Sets a comma separated list of valid file extensions.
public void setIncludeExtensions ( $extensions ) | ||
$extensions | string | Comma separated list of valid file extensions. |
Sets a regexp pattern that is used to accept files path parts.
public void setIncludeFilePattern ( $pattern ) | ||
$pattern | string | Regexp pattern that is used to accept files path parts. |
Sets a wildcard pattern that is used to accept files path parts.
public void setIncludeWildcardPattern ( $pattern ) | ||
$pattern | string | Wildcard pattern that is used to accept files path parts. |
Sets if only dirs are to be accepted in result.
public void setOnlyDirs ( $dirsOnly ) | ||
$dirsOnly | boolean | True if only dirs are to be accepted. |
Sets if only files are to be accepted in result.
public void setOnlyFiles ( $filesOnly ) | ||
$filesOnly | boolean | True if only files are to be accepted. |