W3cubDocs

/Yii 2.0

Class yii\helpers\FileHelper

Inheritance yii\helpers\FileHelper » yii\helpers\BaseFileHelper
Available since version 2.0
Source Code https://github.com/yiisoft/yii2/blob/master/framework/helpers/FileHelper.php

File system helper

Public Properties

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

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

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

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

© 2008–2017 by Yii Software LLC
Licensed under the three clause BSD license.
http://www.yiiframework.com/doc-2.0/yii-helpers-filehelper.html