Can someone explain what the root argument is used for? Is this where temporary operations are performed in the event of reads/writes? It seems odd to have to do the following... (I am attempting to implement a Pathlib like interface over OpenDAL I intend to propose to pyiceberg in favor of fsspec and pyarrow file systems)```py
from urllib.parse import urlparse, ParseResult
from opendal import Operator
from pathlib import Path
class OperatorHelper:
def __init__(self, operator: Operator, parsed: ParseResult, path: Path) -> None:
self.operator = operator
self.parsed = parsed
self.path = path
class FileSystem:
@staticmethod
def _get_operator_helper(path: str, **options) -> OperatorHelper:
"""Get the OperatorHelper for the given path.
Args:
path: The path to the file or directory.
Returns:
OperatorHelper
"""
parsed = urlparse(path)
scheme = parsed.scheme
netloc = parsed.netloc
path = Path(parsed.path)
root = str(path.parent)
if scheme in ("fs", ""):
operator = Operator("fs", root=root, **options)
elif scheme in ("s3", "gcs"):
operator = Operator(scheme, root=root, bucket=netloc)
return OperatorHelper(operator, parsed, path)
def read(self, path: str, **options):
helper = self._get_operator_helper(path, **options)
name = helper.path.name
return helper.operator.read(name)
file_system = FileSystem()
```