Re: System class/package?
| From: | Tomas V.V.Cox | Date: | Thu, 02 Aug 2001 12:20:11 +0000 |
| Subject: | Re: System class/package? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-1234@lists.php.net to get a copy of this message | ||
"Stig S. Bakken" wrote:
>
> We need a way to provide portable substitutions for commands like "rm
> -rf", "mkdir -p" and so on. So I'ld like to make a "System"
> class
> providing function for each command.
>
> In general we could take a UNIX command, make a function for it that
> takes two parameters: the regular list of arguments, and a list of
> options. For example:
>
> System::rm($this->tmpdir, "recursive")
>
> or with multiple params/options:
>
> System::cp(array("original.dat", "copy.dat"), array("preserve",
> "verbose"))
>
+1
Secure copy, safe delete, etc. are really needed functions.
Tomas V.V.Cox