def location_from_path_for_server(self, path):
"""Construct a location from a simple string path.
Path is just a reference into the bucket of the form:
{bucket_name}/{object_path}
"""
if not path:
path = self.bucket
posix_path = pathlib.PurePosixPath(path.lstrip("/"))
return self.service_account.create_oauth_location(
bucket=posix_path.parts[0],
path=utils.join_path(*posix_path.parts[1:]))
评论列表
文章目录