boolean &cat(
string
$args)
|
|
Concatenate files
Usage: 1) $var = System::cat('sample.txt test.txt'); 2) System::cat('sample.txt test.txt > final.txt'); 3) System::cat('sample.txt test.txt >> final.txt');
Note: as the class use fopen, urls should work also (test that)
Parameters:
The "find" command
Usage:
System::find($dir); System::find("$dir -type d"); System::find("$dir -type f"); System::find("$dir -name *.php"); System::find("$dir -name *.php -name *.htm*"); System::find("$dir -maxdepth 1");
Params implmented: $dir -> Start the search at this directory -type d -> return only directories -type f -> return only files -maxdepth <n> -> max depth of recursion -name <pattern> -> search pattern (bash style). Multiple -name param allowed
Parameters:
mixed mktemp(
[string
$args = null])
|
|
Creates temporary files or directories. This function will remove the created files when the scripts finish its execution.
Usage: 1) $tempfile = System::mktemp("prefix"); 2) $tempdir = System::mktemp("-d prefix"); 3) $tempfile = System::mktemp(); 4) $tempfile = System::mktemp("-t /var/tmp prefix");
prefix -> The string that will be prepended to the temp name (defaults to "tmp"). -d -> A temporary dir will be created instead of a file. -t -> The target dir where the temporary (file|dir) will be created. If this param is missing by default the env vars TMP on Windows or TMPDIR in Unix will be used. If these vars are also missing c:\windows\temp or /tmp will be used.
Parameters:
Get the path of the temporal directory set in the system by looking in its environments variables.
Note: php.ini-recommended removes the "E" from the variables_order setting, making unavaible the $_ENV array, that s why we do tests with _ENV