All Data Structures Functions Variables Pages
Static Public Member Functions
FileUtil Class Reference

Static Public Member Functions

static getFilesFromDir ($dir, $basePath, $beginAliasPath, $includeTests=false)
 
static getNonWriteableFilesOrFolders ($directory, &$nonWritableItems=array())
 
static copyRecursive ($source, $target)
 
static deleteDirectoryRecursive ($directory, $removeDirectoryItself=true, $filesOrFoldersToSkip=array())
 

Detailed Description

Helper functionality for manipulation files.

Definition at line 40 of file FileUtil.php.

Member Function Documentation

static getFilesFromDir (   $dir,
  $basePath,
  $beginAliasPath,
  $includeTests = false 
)
static

Get files from directory, to be imported using Yii::import function For WebApplication, we don't want to include files from test folders.

Parameters
string$dir
string$basePath
string$beginAliasPath
boolean$includeTests
Returns
array

Definition at line 51 of file FileUtil.php.

static getNonWriteableFilesOrFolders (   $directory,
$nonWritableItems = array() 
)
static

Get array of files or folders in directory that are not writeable by user.

Parameters
string$directory

Definition at line 99 of file FileUtil.php.

static copyRecursive (   $source,
  $target 
)
static

Copy folders and files recursive

Parameters
string$source
string$target

Definition at line 133 of file FileUtil.php.

static deleteDirectoryRecursive (   $directory,
  $removeDirectoryItself = true,
  $filesOrFoldersToSkip = array() 
)
static

Delete folder and all its contents

Parameters
string$directory
boolean$removeDirectoryItself- Should directory be removed also, or just its content
array$filesOrFoldersToSkip- List of files/folders not to be deleted

Definition at line 167 of file FileUtil.php.


The documentation for this class was generated from the following file:
Generated on Mon Jun 1 2020 07:10:47