Public Member Functions | |
| copy ($sourceDirectory, &$destinationDirectory, $asChild=true, $recursive=true, $includeHidden=false, $excludeItems=false) | |
| directoryPermission () | |
| dirpath ($filepath) | |
| eZDir () | |
| filenamePath ($filename, $maxCharLen=2) | |
| getPathFromFilename ($filename) | |
| temporaryFileRegexp ($standalone=true) | |
Static Public Member Functions | |
| cleanPath ($path, $toType=EZ_DIR_SEPARATOR_UNIX) | |
| cleanupEmptyDirectories ($dir) | |
| convertSeparators ($path, $toType=EZ_DIR_SEPARATOR_UNIX) | |
| createMultiLevelPath ($key, $maxDepth=-1) | |
| findSubdirs ($dir, $includeHidden=false, $excludeItems=false) | |
| findSubitems ($dir, $types=false, $fullPath=false, $includeHidden=false, $excludeItems=false) | |
| isWriteable ($dirname) | |
| mkdir ($dir, $perm=false, $parents=false) | |
| path ($names, $includeEndSeparator=false, $type=EZ_DIR_SEPARATOR_UNIX) | |
| recursiveDelete ($dir) | |
| recursiveFind ($dir, $suffix) | |
| recursiveFindRelative ($baseDir, $subDir, $suffix) | |
| recursiveList ($dir, $path, &$fileList) | |
| separator ($type) | |
| unlinkWildcard ($dir, $pattern) | |
Static Private Member Functions | |
| doMkdir ($dir, $perm) | |
The class eZDir does.
Definition at line 46 of file ezfile/classes/ezdir.php.
| eZDir::cleanPath | ( | $ | path, | |
| $ | toType = EZ_DIR_SEPARATOR_UNIX | |||
| ) | [static] |
Removes all unneeded directory separators and resolves any "."s and ".."s found in $path.
For instance: "var/../lib/ezdb" becomes "lib/ezdb", while "../site/var" will not be changed.
Definition at line 265 of file ezfile/classes/ezdir.php.
Referenced by cleanupEmptyDirectories(), dirpath(), mkdir(), nameFromPath(), and path().
| eZDir::cleanupEmptyDirectories | ( | $ | dir | ) | [static] |
Goes trough the directory path $dir and removes empty directories.
true. Definition at line 149 of file ezfile/classes/ezdir.php.
Referenced by eZWebDAVServer::processClientRequest(), eZImageAliasHandler::removeAliases(), eZImageAliasHandler::removeAllAliases(), and eZImageAliasHandler::updateAliasPath().
| eZDir::convertSeparators | ( | $ | path, | |
| $ | toType = EZ_DIR_SEPARATOR_UNIX | |||
| ) | [static] |
Converts any directory separators found in $path, in both unix and dos style, into the separator type specified by $toType and returns it.
Definition at line 251 of file ezfile/classes/ezdir.php.
Referenced by cleanPath().
| eZDir::copy | ( | $ | sourceDirectory, | |
| &$ | destinationDirectory, | |||
| $ | asChild = true, |
|||
| $ | recursive = true, |
|||
| $ | includeHidden = false, |
|||
| $ | excludeItems = false | |||
| ) |
Copies a directory (and optionally all it's subitems) to another directory.
| $sourceDirectory | The source directory which should be copied, this location must exist. | |
| $destinationDirectory | The location for the copied directory structure, this location must exist. This parameter will be modified if $asChild is true. | |
| If | true then it will use last part of the $sourceDirectory as a sub-folder to $destinationDirectory. e.g. copying /etc/httpd to /var/ will create /var/httpd and place all folders/files under it. | |
| $recursive | If true then it will copy folders/files recursively from folders found in $sourceDirectory. | |
| $includeHidden | If true it will include files or folders beginning with a dot (.). | |
| $excludeItems | A regular expression used to exclude files or folders in the subtree, use false for no exclusion. |
Definition at line 586 of file ezfile/classes/ezdir.php.
Referenced by eZInstallScriptPackageHandler::add(), eZExtensionPackageHandler::add(), and eZExtensionPackageCreator::finalize().
| eZDir::createMultiLevelPath | ( | $ | key, | |
| $ | maxDepth = -1 | |||
| ) | [static] |
echo createMultiLevelPath( "42abce", 3 );
Parameters: $key: the key to be used as path $maxDepth: the maximum number of path elements to be created (-1 is unlimited)
Definition at line 68 of file ezfile/classes/ezdir.php.
| eZDir::directoryPermission | ( | ) |
Definition at line 196 of file ezfile/classes/ezdir.php.
Referenced by eZImageManager::convert(), copy(), eZFile::create(), eZContentObjectPackageHandler::createDOMNodeFromFile(), eZDBPackageHandler::createInstallNode(), eZContentObjectPackageHandler::createObjectListNode(), eZURLAlias::createWildcardMatches(), eZImageAliasHandler::generateXMLData(), eZMediaType::insertRegularFile(), eZBinaryFileType::insertRegularFile(), eZFilePackageHandler::install(), eZExtensionPackageHandler::install(), mkdir(), eZHTTPFile::store(), eZTranslationCache::storeCache(), eZMediaType::unserializeContentObjectAttribute(), eZBinaryFileType::unserializeContentObjectAttribute(), and eZImageAliasHandler::updateAliasPath().
| eZDir::dirpath | ( | $ | filepath | ) |
$dirpath = eZDir::dirpath( "path/to/some/file.txt" ); print( $dirpath ); // prints out path/to/some
Definition at line 183 of file ezfile/classes/ezdir.php.
Referenced by eZContentObjectPackageHandler::createDOMNodeFromFile(), eZContentObjectPackageHandler::installTemplates(), eZPDF::modify(), and eZImageAliasHandler::removeAllAliases().
| eZDir::doMkdir | ( | $ | dir, | |
| $ | perm | |||
| ) | [static, private] |
Creates the directory $dir with permission $perm.
Definition at line 207 of file ezfile/classes/ezdir.php.
Referenced by cleanupEmptyDirectories(), and mkdir().
| eZDir::eZDir | ( | ) |
Constructor
Definition at line 51 of file ezfile/classes/ezdir.php.
| eZDir::filenamePath | ( | $ | filename, | |
| $ | maxCharLen = 2 | |||
| ) |
Definition at line 89 of file ezfile/classes/ezdir.php.
Referenced by eZContentCache::cachePathInfo(), eZContentCache::cleanup(), and eZNodeviewfunctions::generateViewCacheFile().
| eZDir::findSubdirs | ( | $ | dir, | |
| $ | includeHidden = false, |
|||
| $ | excludeItems = false | |||
| ) | [static] |
Returns all subdirectories in a folder
Definition at line 528 of file ezfile/classes/ezdir.php.
Referenced by eZTSTranslator::fetchList().
| eZDir::findSubitems | ( | $ | dir, | |
| $ | types = false, |
|||
| $ | fullPath = false, |
|||
| $ | includeHidden = false, |
|||
| $ | excludeItems = false | |||
| ) | [static] |
Returns all subdirectories in a folder
Definition at line 537 of file ezfile/classes/ezdir.php.
Referenced by copy(), eZTSTranslator::fetchList(), and findSubdirs().
| eZDir::getPathFromFilename | ( | $ | filename | ) |
Definition at line 75 of file ezfile/classes/ezdir.php.
Referenced by eZImage::attribute(), eZTemplateImageOperator::hasImage(), eZTemplateImageOperator::loadImage(), eZImageVariation::requestVariation(), eZTemplateImageOperator::setLoadImage(), and eZTemplateImageOperator::storeImage().
| eZDir::isWriteable | ( | $ | dirname | ) | [static] |
Check if a given directory is writeable
Definition at line 657 of file ezfile/classes/ezdir.php.
| eZDir::mkdir | ( | $ | dir, | |
| $ | perm = false, |
|||
| $ | parents = false | |||
| ) | [static] |
Creates the directory $dir with permissions $perm. If $parents is true it will create any missing parent directories, just like 'mkdir -p'.
Definition at line 107 of file ezfile/classes/ezdir.php.
Referenced by eZInstallScriptPackageHandler::add(), eZExtensionPackageHandler::add(), eZWebDAVServer::appendLogEntry(), eZImageManager::convert(), copy(), eZFile::create(), eZContentObjectPackageHandler::createDOMNodeFromFile(), eZDBPackageHandler::createInstallNode(), eZContentObjectPackageHandler::createObjectListNode(), eZURLAlias::createWildcardMatches(), doMkdir(), eZCharTransform::executeCacheFile(), eZMutex::eZMutex(), eZExtensionPackageCreator::finalize(), eZNodeviewfunctions::generateNodeView(), eZImageAliasHandler::generateXMLData(), eZUser::getCacheDir(), eZSSLZone::getSSLZones(), eZImageAliasHandler::initializeFromFile(), eZMediaType::insertRegularFile(), eZBinaryFileType::insertRegularFile(), eZFilePackageHandler::install(), eZExtensionPackageHandler::install(), eZContentObjectPackageHandler::installTemplates(), eZPDF::modify(), eZPHPCreator::open(), eZTemplateCacheFunction::process(), eZSubtreeCache::renameDir(), eZImageVariation::requestVariation(), eZINI::save(), eZINI::saveCache(), eZImageInterface::store(), eZHTTPFile::store(), eZContentCache::store(), eZTranslationCache::storeCache(), eZStaticCache::storeCache(), eZStaticCache::storeCachedFile(), eZCodePage::storeCacheObject(), eZTemplateImageOperator::storeImage(), eZWebDAVServer::storeUploadedFile(), eZMediaType::unserializeContentObjectAttribute(), eZBinaryFileType::unserializeContentObjectAttribute(), eZImageAliasHandler::updateAliasPath(), eZLog::write(), eZDebug::writeFile(), and eZLog::writeStorageLog().
| eZDir::path | ( | $ | names, | |
| $ | includeEndSeparator = false, |
|||
| $ | type = EZ_DIR_SEPARATOR_UNIX | |||
| ) | [static] |
Creates a path out of all the dir and file items in the array $names with correct separators in between them. It will also remove unneeded separators. $type is used to determine the separator type, see eZDir::separator. If $includeEndSeparator is true then it will make sure that the path ends with a separator if false it make sure there are no end separator.
Definition at line 297 of file ezfile/classes/ezdir.php.
Referenced by eZTranslationCache::cacheDirectory(), eZTemplateTreeCache::cacheDirectory(), eZSSLZone::cacheFileName(), eZContentCache::cachePathInfo(), eZContentCache::cleanup(), eZTemplateCompiler::compilationDirectory(), eZTemplateCompiler::executeCompilation(), eZExtension::extensionInfo(), eZMutex::eZMutex(), eZFSFileHandler::fileDeleteByRegex(), eZINI::findInputFiles(), eZImageVariation::fullPath(), eZTemplateCompiler::generatePHPCodeChildren(), eZNodeviewfunctions::generateViewCacheFile(), eZCollaborationItemHandler::handlerRepositories(), eZTemplateImageOperator::hasImage(), eZDBInterface::insertFile(), eZCollaborationItemHandler::instantiate(), eZTemplateImageOperator::loadImage(), eZTSTranslator::loadTranslationFile(), eZDebug::printReport(), eZImageInterface::processImage(), eZStaticCache::removeURL(), eZTranslationCache::rootCacheDirectory(), eZINI::save(), eZTemplateImageOperator::setLoadImage(), eZImageInterface::store(), eZTemplateImageOperator::storeImage(), and eZPackageType::storeObjectAttribute().
| eZDir::recursiveDelete | ( | $ | dir | ) | [static] |
Removes the directory and all it's contents, recursive.
Definition at line 319 of file ezfile/classes/ezdir.php.
Referenced by eZCache::clearGlobalINICache(), eZCache::clearItem(), eZFSFileHandler::delete(), eZFSFileHandler::fileDelete(), eZExtensionPackageHandler::install(), eZPackage::remove(), and eZExtensionPackageHandler::uninstall().
| eZDir::recursiveFind | ( | $ | dir, | |
| $ | suffix | |||
| ) | [static] |
Recurses through the directory and returns the files that matches the given suffix
Definition at line 376 of file ezfile/classes/ezdir.php.
Referenced by eZFilePackageHandler::handleParameters().
| eZDir::recursiveFindRelative | ( | $ | baseDir, | |
| $ | subDir, | |||
| $ | suffix | |||
| ) | [static] |
Recurses through the directory and returns the files that matches the given suffix. This function will store the relative path from the given base only. Note: this function will not traverse . (hidden) folders
Definition at line 486 of file ezfile/classes/ezdir.php.
Referenced by eZTemplateDesignResource::overrideArray().
| eZDir::recursiveList | ( | $ | dir, | |
| $ | path, | |||
| &$ | fileList | |||
| ) | [static] |
Creates a list of all files and dirs in the directory.
Definition at line 347 of file ezfile/classes/ezdir.php.
Referenced by eZExtensionPackageHandler::add(), and eZExtensionPackageCreator::finalize().
| eZDir::separator | ( | $ | type | ) | [static] |
Type can be one of the following:
Definition at line 232 of file ezfile/classes/ezdir.php.
Referenced by cleanPath(), convertSeparators(), createMultiLevelPath(), and path().
| eZDir::temporaryFileRegexp | ( | $ | standalone = true |
) |
Definition at line 640 of file ezfile/classes/ezdir.php.
| eZDir::unlinkWildcard | ( | $ | dir, | |
| $ | pattern | |||
| ) | [static] |
Unlink files match the given pattern in the given directory.
Definition at line 410 of file ezfile/classes/ezdir.php.
Referenced by eZPackageType::storeObjectAttribute().
1.6.3