Ejemplo n.º 1
0
 /**
  * Change stream options
  *
  * @param string $path
  * @param int    $option
  * @param int    $var
  */
 public function stream_metadata($path, $option, $var)
 {
     $this->openFile($path);
     switch ($option) {
         case STREAM_META_TOUCH:
             $this->file->touch(isset($var[0]) ? $var[0] : null, isset($var[1]) ? $var[1] : null);
             return true;
         case STREAM_META_OWNER_NAME:
         case STREAM_META_OWNER:
             $this->file->setOwner($var);
             return true;
         case STREAM_META_GROUP_NAME:
         case STREAM_META_GROUP:
             $this->file->setGroup($var);
             return true;
         case STREAM_META_ACCESS:
             $this->file->setMode($var);
             return true;
     }
     return false;
 }