Static Public Member Functions | |
| static | init () |
| static | saveCache () |
| static | exists ($file) |
| static | name ($file) |
| static | nyroExists ($prm) |
| static | webExists ($file) |
| static | read ($file) |
| static | write ($file, $content) |
| static | copy ($oldName, $newName) |
| static | move ($oldName, $newName) |
| static | createDir ($path, $chmod=0777) |
| static | date ($file) |
| static | isLater ($file1, $file2) |
| static | size ($file) |
| static | humanSize ($file) |
| static | delete ($file) |
| static | multipleDelete ($pattern) |
| static | getExt ($file) |
| static | getType ($file) |
| static | fetch ($file, array $vars=array()) |
| static | search ($pattern) |
Private Member Functions | |
| __construct () | |
Static Private Member Functions | |
| static | initCfg () |
| static | initCache () |
Static Private Attributes | |
| static | $cfg |
| static | $searchFiles = array() |
| static | $saveCacheFiles = false |
| static | $cacheFiles = null |
To read and write files Same use like globals variables Singleton
Definition at line 12 of file file.class.php.
| __construct | ( | ) | [private] |
No instanciation for this class
Definition at line 46 of file file.class.php.
| static copy | ( | $ | oldName, | |
| $ | newName | |||
| ) | [static] |
Copy a file to a new location
| string | $oldName Old name path | |
| string | $newName New name path |
Definition at line 268 of file file.class.php.
| static createDir | ( | $ | path, | |
| $ | chmod = 0777 | |||
| ) | [static] |
Create a directory, and all subdirectory if needed If directory already exists, nothing is done
| string | $path | |
| string | $chmod |
Definition at line 291 of file file.class.php.
| static date | ( | $ | file | ) | [static] |
Get the file update date
| string | $file The file path |
Definition at line 302 of file file.class.php.
| static delete | ( | $ | file | ) | [static] |
Delete a file
| string | $file The file path |
Definition at line 354 of file file.class.php.
| static exists | ( | $ | file | ) | [static] |
Check if a file exists
| string | $file File path |
Definition at line 97 of file file.class.php.
| static fetch | ( | $ | file, | |
| array $ | vars = array() | |||
| ) | [static] |
Fetch a file with vars (used in tpl)
| string | $file File path name | |
| array | $vars Variables used in the php file |
Definition at line 436 of file file.class.php.
| static getExt | ( | $ | file | ) | [static] |
Get the file extension
| string | $file The filename |
Definition at line 398 of file file.class.php.
| static getType | ( | $ | file | ) | [static] |
Get the Mime Type of a file
| string | $file File path name |
Definition at line 408 of file file.class.php.
| static humanSize | ( | $ | file | ) | [static] |
Get a human file size
| string | $file The file path |
Definition at line 338 of file file.class.php.
| static init | ( | ) | [static] |
Init the file elements
Definition at line 51 of file file.class.php.
| static initCache | ( | ) | [static, private] |
Initialize the cache object
Definition at line 66 of file file.class.php.
| static initCfg | ( | ) | [static, private] |
Init the file configuration
Definition at line 58 of file file.class.php.
| static isLater | ( | $ | file1, | |
| $ | file2 | |||
| ) | [static] |
Compare 2 date files
| string | $file1 The first file path | |
| string | $file2 The second file path |
Definition at line 314 of file file.class.php.
| static move | ( | $ | oldName, | |
| $ | newName | |||
| ) | [static] |
Move a file to a new location
| string | $oldName Old name path | |
| string | $newName New name path |
Definition at line 279 of file file.class.php.
| static multipleDelete | ( | $ | pattern | ) | [static] |
Delete files with a pattern
| string | $pattern The pattern to delete files (glob used) |
Definition at line 384 of file file.class.php.
| static name | ( | $ | file | ) | [static] |
Get the filename from a path
| string | $file |
Definition at line 118 of file file.class.php.
| static nyroExists | ( | $ | prm | ) | [static] |
Try to find the file location, in the nyro installation in this order: my directory, plugin directory and nyro directory. The order can be reverse by setting rtl parameter to false. If the file is located on a subdirectory, use _ to replace /.
| array | $prm Possible values :
|
Definition at line 137 of file file.class.php.
| static read | ( | $ | file | ) | [static] |
Read a file
| string | $file The file path |
Definition at line 242 of file file.class.php.
| static saveCache | ( | ) | [static] |
Save the cache
Definition at line 84 of file file.class.php.
| static search | ( | $ | pattern | ) | [static] |
Search files regarding a pattern
| string | $pattern |
Definition at line 451 of file file.class.php.
| static size | ( | $ | file | ) | [static] |
Get a file size
| string | $file The file path |
Definition at line 325 of file file.class.php.
| static webExists | ( | $ | file | ) | [static] |
Check if a file exists in the web directory
| string | $file Filename |
Definition at line 232 of file file.class.php.
| static write | ( | $ | file, | |
| $ | content | |||
| ) | [static] |
Write into a file
| string | $file The file path | |
| string | $content The file content |
Definition at line 256 of file file.class.php.
$cacheFiles = null [static, private] |
Definition at line 41 of file file.class.php.
$cfg [static, private] |
Definition at line 19 of file file.class.php.
$saveCacheFiles = false [static, private] |
Definition at line 34 of file file.class.php.
$searchFiles = array() [static, private] |
Checkif a file exists
| string | $file The file path |
Definition at line 27 of file file.class.php.
1.7.1