|
eZ Publish
[4.2]
|
Static Public Member Functions | |
| static | cleanPath ($path, $toType=self::SEPARATOR_UNIX) |
| static | cleanupEmptyDirectories ($dir) |
| static | convertSeparators ($path, $toType=self::SEPARATOR_UNIX) |
| static | copy ($sourceDirectory, &$destinationDirectory, $asChild=true, $recursive=true, $includeHidden=false, $excludeItems=false) |
| static | createMultiLevelPath ($key, $maxDepth=-1) |
| static | directoryPermission () |
| static | dirpath ($filepath) |
| static | filenamePath ($filename, $maxCharLen=2) |
| static | findSubdirs ($dir, $includeHidden=false, $excludeItems=false) |
| static | findSubitems ($dir, $types=false, $fullPath=false, $includeHidden=false, $excludeItems=false) |
| static | getPathFromFilename ($filename) |
| static | isWriteable ($dirname) |
| static | mkdir ($dir, $perm=false, $recursive=false) |
| static | path ($names, $includeEndSeparator=false, $type=self::SEPARATOR_UNIX) |
| static | recursiveDelete ($dir, $rootCheck=false) |
| Removes a directory and all it's contents, recursively. | |
| static | recursiveFind ($dir, $suffix) |
| static | recursiveFindRelative ($baseDir, $subDir, $suffix) |
| static | recursiveList ($dir, $path, &$fileList) |
| static | separator ($type) |
| static | temporaryFileRegexp ($standalone=true) |
| static | unlinkWildcard ($dir, $pattern) |
Public Attributes | |
| const | SEPARATOR_DOS = 3 |
| const | SEPARATOR_LOCAL = 1 |
| const | SEPARATOR_UNIX = 2 |
Static Private Member Functions | |
| static | doMkdir ($dir, $perm, $recursive=false) |
| static eZDir::cleanPath | ( | $ | path, |
| $ | toType = self::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 225 of file ezdir.php.
Referenced by cleanupEmptyDirectories(), dirpath(), mkdir(), nameFromPath(), eZExtension\nameFromPath(), and path().
| static eZDir::cleanupEmptyDirectories | ( | $ | dir | ) | [static] |
Goes trough the directory path $dir and removes empty directories.
true. Definition at line 118 of file ezdir.php.
Referenced by eZWebDAVServer\processClientRequest(), eZImageAliasHandler\removeAliases(), eZImageAliasHandler\removeAllAliases(), eZWebDAVContentBackend\setResourceContents(), and eZImageAliasHandler\updateAliasPath().
| static eZDir::convertSeparators | ( | $ | path, |
| $ | toType = self::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 211 of file ezdir.php.
Referenced by cleanPath().
| static eZDir::copy | ( | $ | sourceDirectory, |
| &$ | destinationDirectory, | ||
| $ | asChild = true, |
||
| $ | recursive = true, |
||
| $ | includeHidden = false, |
||
| $ | excludeItems = false |
||
| ) | [static] |
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. |
| $asChild | 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 564 of file ezdir.php.
Referenced by eZInstallScriptPackageHandler\add(), eZExtensionPackageHandler\addExtension(), eZPackage\appendFile(), eZSiteInstaller\createSiteAccess(), eZPackage\exportToArchive(), and eZExtensionPackageHandler\install().
| static 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)
| static eZDir::directoryPermission | ( | ) | [static] |
Definition at line 165 of file ezdir.php.
Referenced by copy(), mkdir(), and eZWebDAVContentBackend\tempDirectory().
| static eZDir::dirpath | ( | $ | filepath | ) | [static] |
$dirpath = eZDir::dirpath( "path/to/some/file.txt" ); print( $dirpath ); // prints out path/to/some
Definition at line 152 of file ezdir.php.
Referenced by eZPackage\appendSimpleFile(), eZClusterFileHandler\cleanupEmptyDirectories(), eZContentObjectPackageHandler\createDOMNodeFromFile(), eZContentObjectPackageHandler\installTemplates(), eZPDF\modify(), and eZImageAliasHandler\removeAllAliases().
| static eZDir::doMkdir | ( | $ | dir, |
| $ | perm, | ||
| $ | recursive = false |
||
| ) | [static, private] |
Creates the directory $dir with permission $perm.
Definition at line 175 of file ezdir.php.
Referenced by cleanupEmptyDirectories().
| static eZDir::filenamePath | ( | $ | filename, |
| $ | maxCharLen = 2 |
||
| ) | [static] |
Definition at line 78 of file ezdir.php.
Referenced by eZContentCache\cachePathInfo(), eZContentCache\cleanup(), and eZNodeviewfunctions\generateViewCacheFile().
| static eZDir::findSubdirs | ( | $ | dir, |
| $ | includeHidden = false, |
||
| $ | excludeItems = false |
||
| ) | [static] |
Returns all subdirectories in a folder
Definition at line 506 of file ezdir.php.
Referenced by eZTSTranslator\fetchList().
| static eZDir::findSubitems | ( | $ | dir, |
| $ | types = false, |
||
| $ | fullPath = false, |
||
| $ | includeHidden = false, |
||
| $ | excludeItems = false |
||
| ) | [static] |
Returns all subdirectories in a folder
Definition at line 515 of file ezdir.php.
Referenced by copy(), eZTSTranslator\fetchList(), findSubdirs(), and eZPackage\packageRepositories().
| static eZDir::getPathFromFilename | ( | $ | filename | ) | [static] |
Definition at line 64 of file ezdir.php.
Referenced by eZTemplateImageOperator\hasImage(), eZTemplateImageOperator\loadImage(), eZTemplateImageOperator\setLoadImage(), and eZTemplateImageOperator\storeImage().
| static eZDir::isWriteable | ( | $ | dirname | ) | [static] |
| static eZDir::mkdir | ( | $ | dir, |
| $ | perm = false, |
||
| $ | recursive = false |
||
| ) | [static] |
Creates the directory $dir with permissions $perm. If $recursive is true it will create any missing parent directories, just like 'mkdir -p'.
Definition at line 96 of file ezdir.php.
Referenced by eZDBFileHandlerMysqlBackend\__mkdir_p(), eZDFSFileHandlerMySQLBackend\__mkdir_p(), eZTARArchiveHandler\_dirCheck(), eZTARArchiveHandler\_extractList(), eZInstallScriptPackageHandler\add(), eZExtensionPackageHandler\addExtension(), eZPackage\appendFile(), eZPackage\appendInstall(), eZWebDAVServer\appendLogEntry(), eZWebDAVContentBackend\appendLogEntry(), eZPackage\appendSimpleFile(), eZCharTransform\cacheFilePath(), changeDBCharsetORACLE(), checkDir(), eZImageManager\convert(), copy(), copyDir(), copyFilesFromDB(), eZFile\create(), eZContentObjectPackageHandler\createDOMNodeFromFile(), eZDBPackageHandler\createInstallNode(), eZContentObjectPackageHandler\createObjectListNode(), eZSiteInstaller\createSiteAccess(), eZURLWildcard\createWildcardsIndex(), doMkdir(), eZMutex\eZMutex(), eZUser\getCacheDir(), eZSSLZone\getSSLZones(), eZPackage\import(), eZImageAliasHandler\initializeFromFile(), eZBinaryFileType\insertRegularFile(), eZMediaType\insertRegularFile(), eZFilePackageHandler\install(), eZExtensionPackageHandler\install(), eZContentObjectPackageHandler\installTemplates(), eZPDF\modify(), eZPHPCreator\open(), eZFile\rename(), eZSubtreeCache\renameDir(), eZWebDAVServer\rootDirectory(), eZINI\save(), eZINI\saveCache(), eZFS2FileHandler\startCacheGeneration(), eZHTTPFile\store(), eZContentCache\store(), eZImageInterface\store(), eZTranslationCache\storeCache(), eZPackage\storeCache(), eZStaticCache\storeCachedFile(), eZPackage\storePackageFile(), eZWebDAVServer\storeUploadedFile(), eZWebDAVContentBackend\storeUploadedFile(), eZWebDAVServer\tempDirectory(), eZWebDAVContentBackend\tempDirectory(), eZBinaryFileType\unserializeContentObjectAttribute(), eZMediaType\unserializeContentObjectAttribute(), eZImageAliasHandler\updateAliasPath(), eZLog\write(), eZDebug\writeFile(), and eZLog\writeStorageLog().
| static eZDir::path | ( | $ | names, |
| $ | includeEndSeparator = false, |
||
| $ | type = self::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 260 of file 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(), 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(), eZPHPCreator\store(), eZTemplateImageOperator\storeImage(), and eZPackageType\storeObjectAttribute().
| static eZDir::recursiveDelete | ( | $ | dir, |
| $ | rootCheck = false |
||
| ) | [static] |
Removes a directory and all it's contents, recursively.
| string | $dir | Directory to remove |
| bool | $rootCheck | Check whether $dir is supposed to be contained in eZ Publish root directory |
Definition at line 287 of file ezdir.php.
Referenced by changeDBCharsetORACLE(), eZCache\clearGlobalINICache(), eZCache\clearItem(), eZCache\clearTemplateOverrideCache(), eZFSFileHandler\delete(), downloadPackages(), eZFSFileHandler\fileDelete(), eZExtensionPackageHandler\install(), eZDBFileHandler\purge(), eZDFSFileHandler\purge(), eZPackage\remove(), eZPackage\removeFiles(), and eZExtensionPackageHandler\uninstall().
| static eZDir::recursiveFind | ( | $ | dir, |
| $ | suffix | ||
| ) | [static] |
Recurses through the directory and returns the files that matches the given suffix
Definition at line 354 of file ezdir.php.
Referenced by eZFilePackageHandler\handleParameters().
| static eZDir::recursiveFindRelative | ( | $ | baseDir, |
| $ | subDir, | ||
| $ | suffix | ||
| ) | [static] |
| static eZDir::recursiveList | ( | $ | dir, |
| $ | path, | ||
| &$ | fileList | ||
| ) | [static] |
Creates a list of all files and dirs in the directory.
Definition at line 325 of file ezdir.php.
Referenced by eZExtensionPackageHandler\addExtension(), and eZPackage\exportToArchive().
| static eZDir::separator | ( | $ | type | ) | [static] |
Type can be one of the following:
Definition at line 192 of file ezdir.php.
Referenced by cleanPath(), convertSeparators(), createMultiLevelPath(), and path().
| static eZDir::temporaryFileRegexp | ( | $ | standalone = true | ) | [static] |
Definition at line 617 of file ezdir.php.
Referenced by eZPackage\appendFile().
| static eZDir::unlinkWildcard | ( | $ | dir, |
| $ | pattern | ||
| ) | [static] |
Unlink files match the given pattern in the given directory.
Definition at line 388 of file ezdir.php.
Referenced by eZPackageType\storeObjectAttribute().
| const eZDir::SEPARATOR_DOS = 3 |
| const eZDir::SEPARATOR_LOCAL = 1 |
| const eZDir::SEPARATOR_UNIX = 2 |