protected function __construct($path, array &$config, File_Area $area, $content = array()) { $this->path = rtrim($path, '\\/') . DS; $this->resource = false; foreach ($content as $key => $value) { if (!is_int($key)) { $this->content[$key] = $value === false ? false : $area->get_driver($path . DS . $key, $config, $value); } else { $this->content[$key] = $area->get_driver($path . DS . $value, $config); } } }
/** * Get the file's size. * * @param string $type modified or created * @return int Unix Timestamp */ public function get_size() { return $this->area->get_size($this->path); }
public static function factory(array $config = array()) { return \File_Area::factory($config); }
/** * Get directory's the created or modified timestamp. * * @param string $type modified or created * @return int Unix Timestamp */ public function get_time($type = 'modified') { return $this->area->get_time($this->path, $type); }
public static function forge(array $config = array()) { return \File_Area::forge($config); }
/** * Delete file * * @return bool */ public function delete() { // should also destroy object but not possible in PHP right? return $this->area->delete($this->path); }