示例#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);
         }
     }
 }
示例#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);
 }
示例#3
0
 public static function factory(array $config = array())
 {
     return \File_Area::factory($config);
 }
示例#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);
 }
示例#5
0
 public static function forge(array $config = array())
 {
     return \File_Area::forge($config);
 }
示例#6
0
文件: file.php 项目: 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);
	}