Beispiel #1
0
 public function close()
 {
     $this->zip->close();
     if ($this->zip_path) {
         IO_FS::chmod($this->zip_path);
     }
     return $this;
 }
Beispiel #2
0
 protected function join_files($files)
 {
     if (empty($files)) {
         return null;
     }
     $filename = $this->joins_dir($this->files_hash($files) . ".{$this->type}");
     $filepath = '.' . $filename;
     if (!is_file($filepath)) {
         $out = '';
         foreach ($files as $file) {
             $path = '.' . $file;
             $out .= "\n\n";
             $out .= file_exists($path) ? file_get_contents($path) : '';
             if ($this->type == 'js') {
                 $out .= ';';
             }
         }
         $this->postprocess($filepath, $out);
         file_put_contents($filepath, $out);
         IO_FS::chmod($filepath, IO_FS::option('file_mod'));
     }
     return $filename;
 }
Beispiel #3
0
 /**
  * Изменяет права доступа к файловому объекту
  *
  * @param int $mode
  *
  * @return boolean
  */
 public function chmod($mode = null)
 {
     $this->stat = null;
     return IO_FS::chmod($this->path, $mode);
 }