CaMykS  1.0-20181201
 All Classes Files Functions Variables Pages
Functions
folder.php.inc File Reference

Folder specific methods. More...

Functions

 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)
 
 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='')
 

Detailed Description

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.2
Date
Creation: Jul 2005
Modification: Aug 2018
Note
This program is distributed as is - WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Function Documentation

folder_completePath (   $path,
  $rights = 0771 
)

Create all folder needed to complete path.

Parameters
string$path
string$rights
Returns
boolean
folder_copy (   $source,
  $target 
)

Copy a folder and its content to another location.

Parameters
string$source
string$target
Returns
boolean
folder_countFiles (   $path,
  $recursive = true 
)

Count all files in given directory and sub directories.

Parameters
string$path
boolean$recursive
Returns
integer
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_createZipArchive (   $source = '',
  $target = '',
  $includeRootFolder = false 
)

Create a zip archive from given folder.

Parameters
string$source
string$target
string$includeRootFolder
Returns
boolean success
folder_delete (   $folder,
  $recursive = false 
)
folder_getFlatStructure (   $source = '')

Return flat file structure of given folder.

Parameters
string$source
Returns
array
folder_getTemporaryFolder ( )

Return system temporary folder.

Returns
mixed
folder_isInPath (   $folder = '',
  $path = '' 
)

Check if folder is in path

Parameters
string$folder
string$path
Returns
boolean result
folder_listFiles (   $folder)

List files from a folder.

Parameters
string$folder
Returns
array
folder_listFolders (   $folder)

Return folder list inside a given folder.

Parameters
string$folder
Returns
array
folder_listMatchingFolders (   $folder,
  $matching_folders = array() 
)

Return folder list inside a given folder matching.

Parameters
string$folder
array$matching_folders
Returns
array
folder_move (   $source,
  $target 
)

Move a source folder to a target one.

Parameters
string$sourcethe full source path
string$targetthe target folder path
Returns
boolean