Exemplo n.º 1
0
 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);
         }
     }
 }
Exemplo n.º 2
0
 /**
  * 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);
 }
Exemplo n.º 3
0
 public static function factory(array $config = array())
 {
     return \File_Area::factory($config);
 }
Exemplo n.º 4
0
 /**
  * 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);
 }
Exemplo n.º 5
0
 public static function forge(array $config = array())
 {
     return \File_Area::forge($config);
 }
Exemplo n.º 6
0
Arquivo: file.php Projeto: nasumi/fuel
	/**
	 * Delete file
	 *
	 * @return	bool
	 */
	public function delete()
	{
		// should also destroy object but not possible in PHP right?
		return $this->area->delete($this->path);
	}