public function listDir($dir='/', $filter=NULL, $hidden=false, $rev=NUll, $type='sandbox')
	{
		$result = $this->metadata($dir, true, false, $hidden, $rev, $type);
		$return = array();
		foreach ($result['contents'] as $item) {
			$exp = explode('/', $item['path']);
			$ext = explode('.', $name = end($exp));
			if (!$filter || preg_match($filter, $name))
				$return[$name] = array(
					'path' => $item['path'],
					'filename' => $name,
					'extension' => (count($ext) > 1) ? array_pop($ext) : null,
					'basename' => implode('.', $ext),
					'mtime'=>strtotime($item['modified']),
					'size' => $item['bytes'],
					'type' => $item['is_dir'] ? 'dir' : 'file',
				);
		}
		return $return;
	}