The System functions are called like there commandline pendants
if (!System::rm('-r file1 dir1')) { print "Could not delete all the files"; } |
System::rm(array('-r', 'file1', 'dir1')); |
Errors will be printed out using the PHP function trigger_error()() so all the System methods can be silenced prefix a '@' sign before the function call (for example: @System::mkdir('-p dir1/dir2/dir3');).
System provides file system functions. They are named like the file system commands on Unix systems and supports the same options independent of your operation system.
At the moment the functions are tested under Linux and Windows. Further reports about compatibility on other systems are welcome.
Warning |
In earlier versions of PHP 4, unlink() may fail on Windows. This bug is already fixed in up-to-date versions. |
This manual describes the parameters of the System functions, most only a string. The arguments and options of the specific command are not documented in the manual. Please take a look on the man-pages on unix-like systems
man commandname |