Folder specific methods.
More...
|
| folder_createPath ($path, $root, $rights=0771) |
|
| folder_completePath ($path, $rights=0771) |
|
| folder_delete ($folder, $recursive=false) |
|
| folder_copy ($source, $target) |
|
| folder_move ($source, $target) |
|
| folder_getTemporaryFolder () |
|
| folder_listFiles ($folder, $recursive=false, $excluded_folders=array(), $excluded_files=array(), $subFolder='') |
|
| folder_listFolders ($folder) |
|
| folder_listMatchingFolders ($folder, $matching_folders=array()) |
|
| folder_countFiles ($path, $recursive=true) |
|
| folder_createZipArchive ($source='', $target='', $includeRootFolder=false) |
|
| folder_getFlatStructure ($source='') |
|
| folder_isInPath ($folder='', $path='') |
|
| folder_getSize ($folder, $humanReadable=false) |
|
Folder specific methods.
Engine / Tool Library
- Author
- CaMykS Team camyk.nosp@m.s.co.nosp@m.ntact.nosp@m.@gma.nosp@m.il.co.nosp@m.m
- Version
- 1.0.5
- Date
- Creation: Jul 2005
-
Modification: Dec 2019
- Copyright
- 2005 - 2019 CaMykS Team
- Note
- This program is distributed as is - WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
◆ folder_createPath()
folder_createPath |
( |
|
$path, |
|
|
|
$root, |
|
|
|
$rights = 0771 |
|
) |
| |
Create all folder from root folder needed to complete path.
- Parameters
-
string | $path | |
string | $root | |
string | $rights | |
- Returns
- boolean
◆ folder_completePath()
folder_completePath |
( |
|
$path, |
|
|
|
$rights = 0771 |
|
) |
| |
Create all folder needed to complete path.
- Parameters
-
string | $path | |
string | $rights | |
- Returns
- boolean
◆ folder_delete()
folder_delete |
( |
|
$folder, |
|
|
|
$recursive = false |
|
) |
| |
◆ folder_copy()
folder_copy |
( |
|
$source, |
|
|
|
$target |
|
) |
| |
Copy a folder and its content to another location.
- Parameters
-
string | $source | |
string | $target | |
- Returns
- boolean
◆ folder_move()
folder_move |
( |
|
$source, |
|
|
|
$target |
|
) |
| |
Move a source folder to a target one.
- Parameters
-
string | $source | the full source path |
string | $target | the target folder path |
- Returns
- boolean
◆ folder_getTemporaryFolder()
folder_getTemporaryFolder |
( |
| ) |
|
Return system temporary folder.
- Returns
- mixed
◆ folder_listFiles()
folder_listFiles |
( |
|
$folder, |
|
|
|
$recursive = false , |
|
|
|
$excluded_folders = array() , |
|
|
|
$excluded_files = array() , |
|
|
|
$subFolder = '' |
|
) |
| |
List files from a folder.
- Parameters
-
string | $folder | |
boolean | $recursive | |
array | $excluded_folders | |
array | $excluded_files | |
string | $subFolder | |
- Returns
- array
◆ folder_listFolders()
folder_listFolders |
( |
|
$folder | ) |
|
Return folder list inside a given folder.
- Parameters
-
- Returns
- array
◆ folder_listMatchingFolders()
folder_listMatchingFolders |
( |
|
$folder, |
|
|
|
$matching_folders = array() |
|
) |
| |
Return folder list inside a given folder matching.
- Parameters
-
string | $folder | |
array | $matching_folders | |
- Returns
- array
◆ folder_countFiles()
folder_countFiles |
( |
|
$path, |
|
|
|
$recursive = true |
|
) |
| |
Count all files in given directory and sub directories.
- Parameters
-
string | $path | |
boolean | $recursive | |
- Returns
- integer
◆ folder_createZipArchive()
folder_createZipArchive |
( |
|
$source = '' , |
|
|
|
$target = '' , |
|
|
|
$includeRootFolder = false |
|
) |
| |
Create a zip archive from given folder.
- Parameters
-
string | $source | |
string | $target | |
string | $includeRootFolder | |
- Returns
- boolean success
◆ folder_getFlatStructure()
folder_getFlatStructure |
( |
|
$source = '' | ) |
|
Return flat file structure of given folder.
- Parameters
-
- Returns
- array
◆ folder_isInPath()
folder_isInPath |
( |
|
$folder = '' , |
|
|
|
$path = '' |
|
) |
| |
Check if folder is in path.
- Parameters
-
string | $folder | |
string | $path | |
- Returns
- boolean result
◆ folder_getSize()
folder_getSize |
( |
|
$folder, |
|
|
|
$humanReadable = false |
|
) |
| |
Return folder size.
- Parameters
-
string | $folder | |
boolean | $humanReadable | |
- Returns
- string