code: 
  
  
  
  
  
  '''simple docstring'''
  
  import posixpath
  from pathlib import Path
  from unittest.mock import patch
  
  import pytest
  from fsspec.implementations.local import AbstractFileSystem, LocalFileSystem, stringify_path
  from fsspec.registry import _registry as _fsspec_registry
  
  
  class       a_  (       lowercase__ ):
  
      '''simple docstring'''
      UpperCamelCase									=				"""mock"""
  
  
      def __init__(	self				,	*A				,	A				,	**A )	->     Optional[Any]:
          super().__init__()
          _SCREAMING_SNAKE_CASE             =    LocalFileSystem(*_A				,	**_A )
          _SCREAMING_SNAKE_CASE             =    Path(_A ).resolve().as_posix() + '/'
  
  
      def     snake_case_(	self				,	A				,	*A				,	**A )	->     Tuple:
          _SCREAMING_SNAKE_CASE             =    posixpath.join(self.local_root_dir				,	self._strip_protocol(_A ) )
          return self._fs.mkdir(_A				,	*_A				,	**_A )
  
  
      def     snake_case_(	self				,	A				,	*A				,	**A )	->     Optional[int]:
          _SCREAMING_SNAKE_CASE             =    posixpath.join(self.local_root_dir				,	self._strip_protocol(_A ) )
          return self._fs.makedirs(_A				,	*_A				,	**_A )
  
  
      def     snake_case_(	self				,	A )	->     int:
          _SCREAMING_SNAKE_CASE             =    posixpath.join(self.local_root_dir				,	self._strip_protocol(_A ) )
          return self._fs.rmdir(_A )
  
  
      def     snake_case_(	self				,	A				,	A=True				,	*A				,	**A )	->     Union[str, Any]:
          _SCREAMING_SNAKE_CASE             =    posixpath.join(self.local_root_dir				,	self._strip_protocol(_A ) )
          _SCREAMING_SNAKE_CASE             =    self._fs.ls(_A				,	detail=_A				,	*_A				,	**_A )
          if detail:
              return [{**info, "name": info["name"][len(self.local_root_dir ) :]} for info in out]
          else:
              return [name[len(self.local_root_dir ) :] for name in out]
  
  
      def     snake_case_(	self				,	A				,	*A				,	**A )	->     int:
          _SCREAMING_SNAKE_CASE             =    posixpath.join(self.local_root_dir				,	self._strip_protocol(_A ) )
          _SCREAMING_SNAKE_CASE             =    dict(self._fs.info(_A				,	*_A				,	**_A ) )
          _SCREAMING_SNAKE_CASE             =    out['name'][len(self.local_root_dir ) :]
          return out
  
  
      def     snake_case_(	self				,	A				,	A				,	*A				,	**A )	->     Dict:
          _SCREAMING_SNAKE_CASE             =    posixpath.join(self.local_root_dir				,	self._strip_protocol(_A ) )
          _SCREAMING_SNAKE_CASE             =    posixpath.join(self.local_root_dir				,	self._strip_protocol(_A ) )
          return self._fs.cp_file(_A				,	_A				,	*_A				,	**_A )
  
  
      def     snake_case_(	self				,	A				,	*A				,	**A )	->     str:
          _SCREAMING_SNAKE_CASE             =    posixpath.join(self.local_root_dir				,	self._strip_protocol(_A ) )
          return self._fs.rm_file(_A				,	*_A				,	**_A )
  
  
      def     snake_case_(	self				,	A				,	*A				,	**A )	->     List[Any]:
          _SCREAMING_SNAKE_CASE             =    posixpath.join(self.local_root_dir				,	self._strip_protocol(_A ) )
          return self._fs.rm(_A				,	*_A				,	**_A )
  
  
      def     snake_case_(	self				,	A				,	*A				,	**A )	->     int:
          _SCREAMING_SNAKE_CASE             =    posixpath.join(self.local_root_dir				,	self._strip_protocol(_A ) )
          return self._fs._open(_A				,	*_A				,	**_A )
  
  
      def     snake_case_(	self				,	A )	->     Union[str, Any]:
          _SCREAMING_SNAKE_CASE             =    posixpath.join(self.local_root_dir				,	self._strip_protocol(_A ) )
          return self._fs.created(_A )
  
  
      def     snake_case_(	self				,	A )	->     Optional[Any]:
          _SCREAMING_SNAKE_CASE             =    posixpath.join(self.local_root_dir				,	self._strip_protocol(_A ) )
          return self._fs.modified(_A )
  
  
  
  
  
      @classmethod
      def     snake_case_(	cls				,	A )	->     Tuple:
          _SCREAMING_SNAKE_CASE             =    stringify_path(_A )
          if path.startswith("""mock://""" ):
              _SCREAMING_SNAKE_CASE             =    path[7:]
          return path
  
  
  
  
  class       a_  (       lowercase__ ):
  
      '''simple docstring'''
      UpperCamelCase									=				"""tmp"""
      UpperCamelCase									=				None
  
  
      def __init__(	self				,	*A				,	**A )	->     Any:
          assert self.tmp_dir is not None, "TmpDirFileSystem.tmp_dir is not set"
          super().__init__(*_A				,	**_A				,	local_root_dir=self.tmp_dir				,	auto_mkdir=_A )
  
  
  
  
  
      @classmethod
      def     snake_case_(	cls				,	A )	->     Any:
          _SCREAMING_SNAKE_CASE             =    stringify_path(_A )
          if path.startswith("""tmp://""" ):
              _SCREAMING_SNAKE_CASE             =    path[6:]
          return path
  
  
  
  
  
  @pytest.fixture
  def lowerCamelCase		(  )		->int:
      _SCREAMING_SNAKE_CASE             =    MockFileSystem
      _SCREAMING_SNAKE_CASE             =    TmpDirFileSystem
      yield
      del _fsspec_registry["mock"]
      del _fsspec_registry["tmp"]
  
  
  
  
  
  @pytest.fixture
  def lowerCamelCase		(  __lowerCamelCase				:					Optional[int]      , __lowerCamelCase				:					Tuple					)		->Optional[int]:
      _SCREAMING_SNAKE_CASE             =    tmp_path_factory.mktemp("""mockfs"""					)
      return MockFileSystem(local_root_dir=__lowerCamelCase      , auto_mkdir=__lowerCamelCase					)
  
  
  
  
  
  
  @pytest.fixture
  def lowerCamelCase		(  __lowerCamelCase				:					Dict      , __lowerCamelCase				:					Dict					)		->str:
      _SCREAMING_SNAKE_CASE             =    tmp_path_factory.mktemp("""tmpfs"""					)
      with patch.object(__lowerCamelCase      , """tmp_dir"""      , __lowerCamelCase					):
          yield TmpDirFileSystem()
  
  
  
  
style_context: 
  
  
  
  
  
  '''simple docstring'''
  
  import safs
  
  
  class       a_  (       safs.SaFileSystem ):
  
      '''simple docstring'''
  
  
  
  