Class yii\helpers\FileHelper

Inheritanceyii\helpers\FileHelper » yii\helpers\BaseFileHelper
Available since version2.0
Source Code https://github.com/yiisoft/yii2/blob/master/framework/helpers/FileHelper.php

File system helper

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$mimeMagicFile string The path (or alias) of a PHP file containing MIME type information. yii\helpers\BaseFileHelper

Public Methods

Hide inherited methods

MethodDescriptionDefined 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
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

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
loadMimeTypes() Loads MIME types from the specified file. yii\helpers\BaseFileHelper
normalizeOptions() yii\helpers\BaseFileHelper

Constants

Hide inherited constants

ConstantValueDescriptionDefined 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