WPDK  1.5.0
WordPress Development Kit
 All Data Structures Files Functions Variables Pages
WPDKFilesystem Class Reference
Inheritance diagram for WPDKFilesystem:
WPDKObject

Static Public Member Functions

static fileSize ($filename, $precision=2)
 Get the file size. More...
 
static recursiveScan ($path, $match= '')
 get all matched files More...
 
static ext ($filename)
 Extension. More...
 
static filename ($filename)
 Filename. More...
 
- Static Public Member Functions inherited from WPDKObject
static __delta ($last_version, $old_version)
 Object delta compare for combine. More...
 
static delta ($last_version, $old_version)
 
static __dump ($var, $monitor=false)
 Dump a variable. More...
 

Data Fields

 $__version = '1.1.2'
 Version. More...
 
- Data Fields inherited from WPDKObject
 $__version = '1.0.0'
 The version number assigned to the class. More...
 

Additional Inherited Members

- Public Member Functions inherited from WPDKObject
 __className ()
 Returns the class object. More...
 
 __parentClass ()
 Returns the class object for the receiver’s superclass. More...
 
 __isClass ($class)
 Brief. More...
 
 __isSubclassOfClass ($class)
 Return TRUE if the receiving class is a subclass of —or identical to— $class, otherwise FALSE. More...
 

Detailed Description

Filesystem helper.

Author
=undo= info@.nosp@m.wpxt.nosp@m.re.me
Date
2014-01-30
Version
1.1.3

Definition at line 12 of file wpdk-filesystem.php.

Member Function Documentation

static ext (   $filename)
static

Extension.

Return the extension of a filename

See Also
filename()
Parameters
string$filenameA comoplete filename
Returns
string

Definition at line 138 of file wpdk-filesystem.php.

static filename (   $filename)
static

Filename.

Return the only filename part. if a filename is 'test.black.jpg' will return 'test.black'

Since
1.4.15
See Also
ext()
Parameters
string$filenameA comoplete filename
Returns
string

Definition at line 154 of file wpdk-filesystem.php.

static fileSize (   $filename,
  $precision = 2 
)
static

Get the file size.

Return the file size well formatted.

Parameters
string$filenameFile name or path to a file
int$precisionDigits to display after decimal
Returns
string|bool Size (B, KiB, MiB, GiB, TiB, PiB, EiB, ZiB, YiB) or boolean

Definition at line 33 of file wpdk-filesystem.php.

static recursiveScan (   $path,
  $match = '' 
)
static

get all matched files

Return an array with all matched files from root folder. This method release the follow filters:

wpdk_rglob_find_dir( true, $file ) - when find a dir
wpdk_rglob_find_file( true, $file ) - when find a a file
wpdk_rglob_matched( $regexp_result, $file, $match ) - after preg_match() done
Since
1.0.0.b4
Parameters
string$pathFolder root
string$matchOptional. Regex to apply on file name. For example use '/^.*.(php)$/i' to get only php file. Default is empty
Returns
array

Return an array with all matched files from root folder.

get all matched files

Note
Internal recursive use only
Parameters
string$pathFolder root
string$matchOptional. Regex to apply on file name. For example use '/^.*.(php)$/i' to get only php file
array&$resultOptional. Result array. Empty form first call
Returns
array

Definition at line 76 of file wpdk-filesystem.php.

Field Documentation

string $__version = '1.1.2'

Version.

Override version

Definition at line 21 of file wpdk-filesystem.php.


The documentation for this class was generated from the following file: