:py:mod:`dissect.target.containers.raw` ======================================= .. py:module:: dissect.target.containers.raw Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: dissect.target.containers.raw.RawContainer .. py:class:: RawContainer(fh: Union[BinaryIO, pathlib.Path], *args, **kwargs) Bases: :py:obj:`dissect.target.container.Container` Base class that acts as a file-like object wrapper around anything that can behave like a "raw disk". Containers are anything from raw disk images and virtual disks, to evidence containers and made-up binary formats. Consumers of the ``Container`` class only need to implement ``seek``, ``tell`` and ``read``. Override ``__init__`` for any opening that you may need to do, but don't forget to initialize the super class. :param fh: The source file-like object of the container or a ``Path`` object to the file. :param size: The size of the container. :param vs: An optional shorthand to set the underlying volume system, usually set later. .. py:attribute:: __type__ :value: 'raw' .. py:method:: detect_path(path: pathlib.Path, original: Union[list, BinaryIO]) -> bool :staticmethod: Detect if this ``Container`` can be used to open ``path``. The function checks wether file inside ``path`` is formatted in such a way that this ``Container`` can be used to read it. For example, it validates against the file extension. :param path: A location to a file. :param original: The original argument passed to ``detect()``. :returns: ``True`` if this ``Container`` can be used for this path, ``False`` otherwise.