diff options
Diffstat (limited to 'it.class')
-rw-r--r-- | it.class | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -783,6 +783,16 @@ static function file_put($filename, $data, $p = array()) return ($out = fopen($filename == "-" ? "php://stdout" : $filename, "w")) && (fputs($out, $data) === strlen($data)) && fclose($out); } +function cat($fn) +{ + return new it_pipe(array('fn' => $fn)); +} + +function pipe($cmd, $args = array()) +{ + return new it_pipe(is_string($cmd) ? array('cmd' => $cmd, 'args' => $args) : array('data' => $cmd)); +} + } ?> |