
Public Member Functions | |
| getParent () | |
| Alias for getContainingFolder(). | |
| getFilesRecursive (array $suffixes, &$newest) | |
| Gets all files with any of the given suffixes in the folder recursively. | |
| getFilesWithAliasRecursive (array $suffixes, &$newest, $alias) | |
| Almost the same as getFilesRecursive(), but generates aliases as well. | |
| getFilesBySuffix ($suffix, $includeHidden=true) | |
| Get all files in this folder with given suffix. | |
| getFiles ($includeHidden=true) | |
| Fetches all files in this folder. | |
| getFolders ($includeHidden=true) | |
| Fetches all sub-folders in this folder. | |
| getFile ($name) | |
| Gets a file in - or relative to - this folder. | |
| getFolder ($name) | |
| Gets a folder in - or relative to - this folder. | |
| getPathTo (spunQ_IFileNode $node) | |
| Will give the path from this folder to another file node. | |
| getBreadcrumbsTo (spunQ_IFileNode $node) | |
| Does the same as getPathTo(), merely the result has a different format. | |
| create () | |
| Makes sure this folder exists - creating parent folders if necessary. | |
| createTemporaryFile () | |
| Creates a temporary file in this folder. | |
| assureExists () | |
| Throws an exception if this folder does not exist. | |
| isEmpty () | |
| Checks whether this folder contains any files or folders. | |
| delete () | |
| Deletes this folder from the file system including anything in it. | |
| moveTo ($folder, $overwrite, $newName=NULL) | |
| Moves this folder into another directory (and optionally renames it). | |
| exists () | |
| Whether this node already exists in the file system. | |
| residesIn (spunQ_IFolder $folder) | |
| Checks whether this file is in given folder or one of its subfolders. | |
| isReadable () | |
| Whether the node is readable. | |
| getPath () | |
| Returns the path pointing to the node. | |
| getPrettyPath () | |
| Returns the most unique and human-readable path. | |
| getContainingFolder () | |
| Returns the folder this node is residing in. | |
| getName () | |
| Returns the name of this node, deprived of its path. | |
| getLastAccessTime () | |
| Returns the time of last access of this node. | |
| getLastModificationTime () | |
| Returns the time of last modification of this node. | |
Definition at line 6 of file IFolder.interface.php.
| spunQ_IFolder::assureExists | ( | ) |
Throws an exception if this folder does not exist.
| spunQ_IOException |
Implemented in spunQ_Folder.
| spunQ_IFolder::create | ( | ) |
Makes sure this folder exists - creating parent folders if necessary.
Doesn't do anything if the node already exists.
Implemented in spunQ_Folder.
| spunQ_IFolder::createTemporaryFile | ( | ) |
Creates a temporary file in this folder.
| spunQ_IOException |
Implemented in spunQ_Folder.
| spunQ_IFolder::delete | ( | ) |
Deletes this folder from the file system including anything in it.
Implemented in spunQ_Folder.
| spunQ_IFileNode::exists | ( | ) | [inherited] |
Whether this node already exists in the file system.
It is perfectly valid for an object to describe a non-existent node.
Implemented in spunQ_FileNode.
| spunQ_IFolder::getBreadcrumbsTo | ( | spunQ_IFileNode $ | node | ) |
Does the same as getPathTo(), merely the result has a different format.
| $node | Another file node. |
Implemented in spunQ_Folder.
| spunQ_IFileNode::getContainingFolder | ( | ) | [inherited] |
| spunQ_IFolder::getFile | ( | $ | name | ) |
Gets a file in - or relative to - this folder.
Note that this function does not ensure that the file actually exists. This can be achieved by a later call to exists() or create().
| $name | A string describing a file relative to this folder. |
Implemented in spunQ_Folder.
| spunQ_IFolder::getFiles | ( | $ | includeHidden = true |
) |
Fetches all files in this folder.
| $includeHidden | Whether hidden files should be returned, too. |
Implemented in spunQ_Folder.
| spunQ_IFolder::getFilesBySuffix | ( | $ | suffix, | |
| $ | includeHidden = true | |||
| ) |
Get all files in this folder with given suffix.
| $suffix | Either a suffix string or an array of suffixes. Not dot is prepended to the suffix, so if this value is 'ml', all files ending on 'html' will match, too. Whether to return hidden files. |
Implemented in spunQ_Folder.
| spunQ_IFolder::getFilesRecursive | ( | array $ | suffixes, | |
| &$ | newest | |||
| ) |
Gets all files with any of the given suffixes in the folder recursively.
This function is optimized for speed, so it will not return objects.
| $folder | The folder to search in. Sub-folders of this folder will be processed recursively. | |
| $suffixes | List of file suffixes. Any file having one of the suffixes matches and will be returned. | |
| $newest | Out-parameter containing the highest mtime (last modification time) value of all returned files and each folder that was processed in recursive calls. This value will be used to verify the validity of caches holding the result of this function. |
Implemented in spunQ_Folder.
| spunQ_IFolder::getFilesWithAliasRecursive | ( | array $ | suffixes, | |
| &$ | newest, | |||
| $ | alias | |||
| ) |
Almost the same as getFilesRecursive(), but generates aliases as well.
The alias consists of three parts, which are separated by dots:
$spunQFolder->getFilesRecursive(array('.class.php'), $newest, 'spunQ') was called. | $suffixes | List of file suffixes. Any file having one of the suffixes matches and will be returned. | |
| $newest | Out-parameter containing the highest mtime (last modification time) value of all returned files and each folder that was processed in recursive calls. This value will be used to verify the validity of caches holding the result of this function. | |
| $alias | Alias for all files in this folder. This should be the module name, or a similar top-level string. |
Implemented in spunQ_Folder.
| spunQ_IFolder::getFolder | ( | $ | name | ) |
Gets a folder in - or relative to - this folder.
Note that this function does not ensure that the folder actually exists. This can be achieved by a later call to exists() or create().
| $name | A string describing a folder relative to this folder. |
Implemented in spunQ_Folder.
| spunQ_IFolder::getFolders | ( | $ | includeHidden = true |
) |
Fetches all sub-folders in this folder.
| $includeHidden | Whether hidden folders should be returned, too. |
Implemented in spunQ_Folder, and spunQ_SourceFolder.
| spunQ_IFileNode::getLastAccessTime | ( | ) | [inherited] |
Returns the time of last access of this node.
| spunQ_IOException | If the timestamp could not be read. |
Implemented in spunQ_FileNode.
| spunQ_IFileNode::getLastModificationTime | ( | ) | [inherited] |
Returns the time of last modification of this node.
| spunQ_IOException | If the timestamp could not be read. |
Implemented in spunQ_FileNode.
| spunQ_IFileNode::getName | ( | ) | [inherited] |
| spunQ_IFolder::getParent | ( | ) |
| spunQ_IFileNode::getPath | ( | ) | [inherited] |
| spunQ_IFolder::getPathTo | ( | spunQ_IFileNode $ | node | ) |
Will give the path from this folder to another file node.
| $node | Another file node. |
Implemented in spunQ_Folder.
| spunQ_IFileNode::getPrettyPath | ( | ) | [inherited] |
Returns the most unique and human-readable path.
If the file exists, the builtin function realpath() is used. Otherwise, a better-looking path is achieved through string manipulation, i.e. '../a/../d/./' becomes '../d/'.
Implemented in spunQ_FileNode.
| spunQ_IFolder::isEmpty | ( | ) |
| spunQ_IFileNode::isReadable | ( | ) | [inherited] |
| spunQ_IFolder::moveTo | ( | $ | folder, | |
| $ | overwrite, | |||
| $ | newName = NULL | |||
| ) |
Moves this folder into another directory (and optionally renames it).
| $folder | the folder to move to. Either a spunQ_IFolder or a string. | |
| $overwrite | Whether the destination folder should be overwritten. Warning: The destination folder will be replaced(!), not extended. | |
| $newName | The folder will be renamed, too if this is set. |
Implemented in spunQ_Folder.
| spunQ_IFileNode::residesIn | ( | spunQ_IFolder $ | folder | ) | [inherited] |
Checks whether this file is in given folder or one of its subfolders.
| $folder | The folder to test against. |
Implemented in spunQ_FileNode.
1.5.9