class_docstr: A BytesIO-like object, backed by a Python file object.
  
  .. deprecated:: 1.4.0
     FilePath is supplanted by open's new opener keyword argument,
     and will be removed in 2.0.0.
docstr: Open the file and return a Rasterio dataset object.
  
  The provided file-like object is assumed to be readable.
  Writing is currently not supported.
  
  Parameters are optional and have the same semantics as the
  parameters of `rasterio.open()`.
  
  Returns
  -------
  DatasetReader
  
  Raises
  ------
  IOError
      If the memory file is closed.
docstr_tok: ["Open","the","file","and","return","a","Rasterio","dataset","object",".","The","provided","file-like","object","is","assumed","to","be","readable",".","Writing","is","currently","not","supported",".","Parameters","are","optional","and","have","the","same","semantics","as","the","parameters","of","`","rasterio.open","(",")","`",".","Returns","--","--","--","-","DatasetReader","Raises","--","--","--","IOError","If","the","memory","file","is","closed","."]
code: def open(self, driver=None, sharing=False, **kwargs):
      """Open the file and return a Rasterio dataset object.
  
      The provided file-like object is assumed to be readable.
      Writing is currently not supported.
  
      Parameters are optional and have the same semantics as the
      parameters of `rasterio.open()`.
  
      Returns
      -------
      DatasetReader
  
      Raises
      ------
      IOError
          If the memory file is closed.
  
      """
      mempath = _UnparsedPath(self.name)
  
      if self.closed:
          raise IOError("I/O operation on closed file.")
  
      # Assume we were given a non-empty file-like object
      log.debug("VSI path: {}".format(mempath.path))
  
      return DatasetReader(
          mempath, driver=driver, sharing=sharing, **kwargs
      )
  
imports: import logging
  import warnings
  from rasterio._base import get_dataset_driver, driver_can_create, driver_can_create_copy
  from rasterio._io import DatasetReaderBase, DatasetWriterBase, BufferedDatasetWriterBase, MemoryFileBase
  from rasterio.windows import WindowMethodsMixin
  from rasterio.env import ensure_env
  from rasterio.errors import RasterioDeprecationWarning
  from rasterio.transform import TransformMethodsMixin
  from rasterio._path import _UnparsedPath
label_desc: Use image node_id 2 for calling the _FilePath obj's underlying member method code with example usage: obj.open(driver, sharing) and returns: DatasetReader