Installed Extension Is Not Found

I want to install https://github.com/idlesign/ist-yii-cfile extention

and in my protected/config/main.php I added lines :


'components' => array(

...

'file'=>array(

  'class'=>'application.extensions.file.CFile',

),



But calling in control :


if ( !CFile::set($filename_path)->exists ) {



I get error :

I moved the extension into \protected\extensions\ directory

http://s004.radikal.ru/i206/1406/93/b6ad16418924.png

I payed attension that in zip file root directory is called as "ist-yii-cfile-1.0.0", so when I moved it to "\protected\extensions\" directory

this direcory has "ist-yii-cfile-1.0.0" name and I get this error. I renamed it to "file"(as on my image above), but I stiil get error.

As I understand when I wrote in config :


'class'=>'application.extensions.file.CFile'

It means in \protected\extensions\ directory search "file" subdirectory and CFile.php file! But why I get error ?

Thanks!

There’s a “Usage” section on the linked Github page. Please re-read it carefully, then try:


Yii::app()->file->set($filename_path)->exists;

Application component classes aren’t loaded automatically on startup. Yii’s autoloader loads them on the first usage.

Thanks, it helped!