function MkdirForFile($filename,&$error = null,&$error_str = null){
		$directory = preg_replace('/[^\/]+$/','',$filename);
		if(!strlen($directory)){
			$error = true;
			$error_str = "can't determine directory name";
			return;
		}
		return self::Mkdir($directory,$error,$error_str);
	}