yii\helpers\FileHelper - Yii2 类参考手册

Class yii\helpers\FileHelper

Inheritanceyii\helpers\FileHelper » yii\helpers\BaseFileHelper
Available since version2.0

File system helper.

Public Properties

隐藏继承的属性 Hide inherited properties

属性Property类型 Type简介 Description定义在 Defined By
$mimeAliasesFile string The path (or alias) of a PHP file containing MIME aliases. yii\helpers\BaseFileHelper
$mimeMagicFile string The path (or alias) of a PHP file containing MIME type information. yii\helpers\BaseFileHelper

Public Methods

隐藏继承的方法 Hide inherited methods

方法 Method简介 Description定义在 Defined By
copyDirectory() Copies a whole directory as another one. yii\helpers\BaseFileHelper
createDirectory() Creates a new directory. yii\helpers\BaseFileHelper
filterPath() Checks if the given file path satisfies the filtering options. yii\helpers\BaseFileHelper
findDirectories() Returns the directories found under the specified directory and subdirectories. yii\helpers\BaseFileHelper
findFiles() Returns the files found under the specified directory and subdirectories. yii\helpers\BaseFileHelper
getExtensionsByMimeType() Determines the extensions by given MIME type. yii\helpers\BaseFileHelper
getMimeType() Determines the MIME type of the specified file. yii\helpers\BaseFileHelper
getMimeTypeByExtension() Determines the MIME type based on the extension name of the specified file. yii\helpers\BaseFileHelper
localize() Returns the localized version of a specified file. yii\helpers\BaseFileHelper
normalizePath() Normalizes a file/directory path. yii\helpers\BaseFileHelper
removeDirectory() Removes a directory (and all its content) recursively. yii\helpers\BaseFileHelper
unlink() Removes a file or symlink in a cross-platform way yii\helpers\BaseFileHelper

Protected Methods

隐藏继承的方法 Hide inherited methods

方法 Method简介 Description定义在 Defined By
loadMimeAliases() Loads MIME aliases from the specified file. yii\helpers\BaseFileHelper
loadMimeTypes() Loads MIME types from the specified file. yii\helpers\BaseFileHelper
normalizeOptions() yii\helpers\BaseFileHelper

常量 Constants

隐藏继承的常量 Hide inherited constants

常量 Constant值 Value简介 Description定义在 Defined By
PATTERN_CASE_INSENSITIVE 32 yii\helpers\BaseFileHelper
PATTERN_ENDSWITH 4 yii\helpers\BaseFileHelper
PATTERN_MUSTBEDIR 8 yii\helpers\BaseFileHelper
PATTERN_NEGATIVE 16 yii\helpers\BaseFileHelper
PATTERN_NODIR 1 yii\helpers\BaseFileHelper