diff --git a/dissect/target/container.py b/dissect/target/container.py index da9721b87..ed501bcbd 100644 --- a/dissect/target/container.py +++ b/dissect/target/container.py @@ -34,6 +34,11 @@ class Container(io.IOBase): vs: An optional shorthand to set the underlying volume system, usually set later. """ + # Due to lazy importing we generally can't use isinstance(), so we add a short identifying string to each class + # This has the added benefit of having a readily available "pretty name" for each implementation + __type__: str = None + """A short string identifying the type of container.""" + def __init__(self, fh: Union[BinaryIO, Path], size: int, vs: VolumeSystem = None): self.fh = fh self.size = size @@ -41,7 +46,10 @@ def __init__(self, fh: Union[BinaryIO, Path], size: int, vs: VolumeSystem = None # Shorthand access to vs self.vs = vs - def __repr__(self): + if self.__type__ is None: + raise NotImplementedError(f"{self.__class__.__name__} must define __type__") + + def __repr__(self) -> str: return f"<{self.__class__.__name__} size={self.size} vs={self.vs}>" @classmethod diff --git a/dissect/target/containers/asdf.py b/dissect/target/containers/asdf.py index aef010c89..be3e41b58 100644 --- a/dissect/target/containers/asdf.py +++ b/dissect/target/containers/asdf.py @@ -9,6 +9,8 @@ class AsdfContainer(Container): + __type__ = "asdf" + def __init__(self, fh: BinaryIO, *args, **kwargs): file_container = fh diff --git a/dissect/target/containers/ewf.py b/dissect/target/containers/ewf.py index 340869b14..c69bf5585 100644 --- a/dissect/target/containers/ewf.py +++ b/dissect/target/containers/ewf.py @@ -12,6 +12,8 @@ class EwfContainer(Container): """Expert Witness Disk Image Format""" + __type__ = "ewf" + def __init__(self, fh: Union[list, BinaryIO, Path], *args, **kwargs): fhs = [fh] if not isinstance(fh, list) else fh if hasattr(fhs[0], "read"): diff --git a/dissect/target/containers/hdd.py b/dissect/target/containers/hdd.py index 33b748eb6..3e51c1d17 100644 --- a/dissect/target/containers/hdd.py +++ b/dissect/target/containers/hdd.py @@ -8,6 +8,8 @@ class HddContainer(Container): + __type__ = "hdd" + def __init__(self, fh: Path, *args, **kwargs): if hasattr(fh, "read"): raise TypeError("HddContainer can only be opened by path") diff --git a/dissect/target/containers/hds.py b/dissect/target/containers/hds.py index 5febf6f85..5936c4ed5 100644 --- a/dissect/target/containers/hds.py +++ b/dissect/target/containers/hds.py @@ -9,6 +9,8 @@ class HdsContainer(Container): + __type__ = "hds" + def __init__(self, fh: Union[BinaryIO, Path], *args, **kwargs): f = fh if not hasattr(fh, "read"): diff --git a/dissect/target/containers/qcow2.py b/dissect/target/containers/qcow2.py index 8fb717320..6152ea05b 100644 --- a/dissect/target/containers/qcow2.py +++ b/dissect/target/containers/qcow2.py @@ -8,6 +8,8 @@ class QCow2Container(Container): + __type__ = "qcow2" + def __init__(self, fh: Union[BinaryIO, Path], data_file=None, backing_file=None, *args, **kwargs): f = fh if not hasattr(fh, "read"): diff --git a/dissect/target/containers/raw.py b/dissect/target/containers/raw.py index 05c8c3c5d..2abafbb9c 100644 --- a/dissect/target/containers/raw.py +++ b/dissect/target/containers/raw.py @@ -8,6 +8,8 @@ class RawContainer(Container): + __type__ = "raw" + def __init__(self, fh: Union[BinaryIO, Path], *args, **kwargs): if not hasattr(fh, "read"): fh = fh.open("rb") diff --git a/dissect/target/containers/split.py b/dissect/target/containers/split.py index 7abb781e0..b584c29bf 100644 --- a/dissect/target/containers/split.py +++ b/dissect/target/containers/split.py @@ -12,6 +12,8 @@ def find_files(path: Path) -> List[Path]: class SplitContainer(Container): + __type__ = "split" + def __init__(self, fh: Union[list, BinaryIO, Path], *args, **kwargs): self._fhs = [] self.offsets = [0] diff --git a/dissect/target/containers/vdi.py b/dissect/target/containers/vdi.py index 3ac13027a..a8bed62ec 100644 --- a/dissect/target/containers/vdi.py +++ b/dissect/target/containers/vdi.py @@ -10,6 +10,8 @@ class VdiContainer(Container): """VirtualBox hard disks""" + __type__ = "vdi" + def __init__(self, fh: Union[BinaryIO, Path], *args, **kwargs): f = fh if not hasattr(fh, "read"): diff --git a/dissect/target/containers/vhd.py b/dissect/target/containers/vhd.py index 845ac571f..11a87b797 100644 --- a/dissect/target/containers/vhd.py +++ b/dissect/target/containers/vhd.py @@ -8,6 +8,8 @@ class VhdContainer(Container): + __type__ = "vhd" + def __init__(self, fh: Union[BinaryIO, Path], *args, **kwargs): f = fh if not hasattr(fh, "read"): diff --git a/dissect/target/containers/vhdx.py b/dissect/target/containers/vhdx.py index ae848b4ab..a0e30c301 100644 --- a/dissect/target/containers/vhdx.py +++ b/dissect/target/containers/vhdx.py @@ -8,6 +8,8 @@ class VhdxContainer(Container): + __type__ = "vhdx" + def __init__(self, fh: Union[BinaryIO, Path], *args, **kwargs): self.vhdx = vhdx.VHDX(fh) super().__init__(fh, self.vhdx.size, *args, **kwargs) diff --git a/dissect/target/containers/vmdk.py b/dissect/target/containers/vmdk.py index 73b66832e..55bc38f4e 100644 --- a/dissect/target/containers/vmdk.py +++ b/dissect/target/containers/vmdk.py @@ -10,6 +10,8 @@ class VmdkContainer(Container): """VMWare hard disks""" + __type__ = "vmdk" + def __init__(self, fh: Union[BinaryIO, Path], *args, **kwargs): self.vmdk = vmdk.VMDK(fh) super().__init__(fh, self.vmdk.size, *args, **kwargs) diff --git a/dissect/target/filesystem.py b/dissect/target/filesystem.py index 4a1b2e6ba..b7355d001 100644 --- a/dissect/target/filesystem.py +++ b/dissect/target/filesystem.py @@ -5,6 +5,7 @@ import logging import os import stat +import warnings from collections import defaultdict from typing import ( TYPE_CHECKING, @@ -40,8 +41,10 @@ class Filesystem: """Base class for filesystems.""" - __fstype__: str = None - """Defines the type of filesystem it is.""" + # Due to lazy importing we generally can't use isinstance(), so we add a short identifying string to each class + # This has the added benefit of having a readily available "pretty name" for each implementation + __type__: str = None + """A short string identifying the type of filesystem.""" def __init__( self, @@ -57,17 +60,27 @@ def __init__( alt_separator: The alternative separator used to distingish between directories in a path. Raises: - NotImplementedError: When the internal ``__fstype__`` of the class is not defined. + NotImplementedError: When the internal ``__type__`` of the class is not defined. """ self.volume = volume self.case_sensitive = case_sensitive self.alt_separator = alt_separator - if self.__fstype__ is None: - raise NotImplementedError(f"{self.__class__.__name__} must define __fstype__") + + if self.__type__ is None: + raise NotImplementedError(f"{self.__class__.__name__} must define __type__") def __repr__(self) -> str: return f"<{self.__class__.__name__}>" + @classmethod + @property + def __fstype__(cls) -> str: + warnings.warn( + "The __fstype__ attribute is deprecated and will be removed in dissect.target 3.15. Use __type__ instead", + category=DeprecationWarning, + ) + return cls.__type__ + def path(self, *args) -> fsutil.TargetPath: """Get a specific path from the filesystem.""" return fsutil.TargetPath(self, *args) @@ -91,7 +104,7 @@ def detect(cls, fh: BinaryIO) -> bool: except NotImplementedError: raise except Exception as e: - log.warning("Failed to detect %s filesystem", cls.__fstype__) + log.warning("Failed to detect %s filesystem", cls.__type__) log.debug("", exc_info=e) finally: fh.seek(offset) @@ -1028,7 +1041,7 @@ def readlink(self) -> str: class VirtualFilesystem(Filesystem): - __fstype__ = "virtual" + __type__ = "virtual" def __init__(self, **kwargs): super().__init__(None, **kwargs) @@ -1184,7 +1197,7 @@ def symlink(self, src: str, dst: str) -> None: class RootFilesystem(Filesystem): - __fstype__ = "root" + __type__ = "root" def __init__(self, target: Target): self.target = target diff --git a/dissect/target/filesystems/ad1.py b/dissect/target/filesystems/ad1.py index 486f98f9c..4208d3bbc 100644 --- a/dissect/target/filesystems/ad1.py +++ b/dissect/target/filesystems/ad1.py @@ -13,7 +13,7 @@ class AD1Filesystem(Filesystem): - __fstype__ = "ad1" + __type__ = "ad1" def __init__(self, fh, *args, **kwargs): super().__init__(fh, *args, **kwargs) diff --git a/dissect/target/filesystems/cb.py b/dissect/target/filesystems/cb.py index e6446244f..6d0d3288f 100644 --- a/dissect/target/filesystems/cb.py +++ b/dissect/target/filesystems/cb.py @@ -23,7 +23,7 @@ class OS(IntEnum): class CbFilesystem(Filesystem): - __fstype__ = "cb" + __type__ = "cb" def __init__(self, session: LiveResponseSession, prefix: str, *args, **kwargs): self.session = session diff --git a/dissect/target/filesystems/config.py b/dissect/target/filesystems/config.py index 7a3fe0266..3ba7f5bb2 100644 --- a/dissect/target/filesystems/config.py +++ b/dissect/target/filesystems/config.py @@ -15,7 +15,7 @@ class ConfigurationFilesystem(VirtualFilesystem): - __fstype__: str = "META:configuration" + __type__: str = "META:configuration" def __init__(self, target: Target, path: str, **kwargs): super().__init__(**kwargs) diff --git a/dissect/target/filesystems/dir.py b/dissect/target/filesystems/dir.py index 361a7d276..402103d9a 100644 --- a/dissect/target/filesystems/dir.py +++ b/dissect/target/filesystems/dir.py @@ -13,7 +13,7 @@ class DirectoryFilesystem(Filesystem): - __fstype__ = "dir" + __type__ = "dir" def __init__(self, path: Path, *args, **kwargs): super().__init__(None, *args, **kwargs) diff --git a/dissect/target/filesystems/exfat.py b/dissect/target/filesystems/exfat.py index 91e4f98ac..41df6f2d8 100644 --- a/dissect/target/filesystems/exfat.py +++ b/dissect/target/filesystems/exfat.py @@ -15,7 +15,7 @@ class ExfatFilesystem(Filesystem): - __fstype__ = "exfat" + __type__ = "exfat" def __init__(self, fh: BinaryIO, *args, **kwargs): super().__init__(fh, case_sensitive=False, alt_separator="\\", *args, **kwargs) diff --git a/dissect/target/filesystems/extfs.py b/dissect/target/filesystems/extfs.py index 00af1a27e..48edc1603 100644 --- a/dissect/target/filesystems/extfs.py +++ b/dissect/target/filesystems/extfs.py @@ -15,7 +15,7 @@ class ExtFilesystem(Filesystem): - __fstype__ = "ext" + __type__ = "ext" def __init__(self, fh: BinaryIO, *args, **kwargs): super().__init__(fh, *args, **kwargs) diff --git a/dissect/target/filesystems/fat.py b/dissect/target/filesystems/fat.py index 1037edcdb..a204345c3 100644 --- a/dissect/target/filesystems/fat.py +++ b/dissect/target/filesystems/fat.py @@ -11,7 +11,7 @@ class FatFilesystem(Filesystem): - __fstype__ = "fat" + __type__ = "fat" def __init__(self, fh: BinaryIO, *args, **kwargs): super().__init__(fh, case_sensitive=False, alt_separator="\\", *args, **kwargs) diff --git a/dissect/target/filesystems/ffs.py b/dissect/target/filesystems/ffs.py index 182f78413..35158c96d 100644 --- a/dissect/target/filesystems/ffs.py +++ b/dissect/target/filesystems/ffs.py @@ -14,7 +14,7 @@ class FfsFilesystem(Filesystem): - __fstype__ = "ffs" + __type__ = "ffs" def __init__(self, fh: BinaryIO, *args, **kwargs): super().__init__(fh, *args, **kwargs) diff --git a/dissect/target/filesystems/itunes.py b/dissect/target/filesystems/itunes.py index 9b443abb4..56b1d315d 100644 --- a/dissect/target/filesystems/itunes.py +++ b/dissect/target/filesystems/itunes.py @@ -22,7 +22,7 @@ class ITunesFilesystem(Filesystem): """Filesystem implementation for iTunes backups.""" - __fstype__ = "itunes" + __type__ = "itunes" def __init__(self, backup: ITunesBackup, *args, **kwargs): super().__init__(None, *args, **kwargs) diff --git a/dissect/target/filesystems/ntfs.py b/dissect/target/filesystems/ntfs.py index bd28dc2a2..67d43f4c6 100644 --- a/dissect/target/filesystems/ntfs.py +++ b/dissect/target/filesystems/ntfs.py @@ -20,7 +20,7 @@ class NtfsFilesystem(Filesystem): - __fstype__ = "ntfs" + __type__ = "ntfs" def __init__( self, diff --git a/dissect/target/filesystems/smb.py b/dissect/target/filesystems/smb.py index 8dbb2a68e..d00de8537 100644 --- a/dissect/target/filesystems/smb.py +++ b/dissect/target/filesystems/smb.py @@ -31,7 +31,7 @@ class SmbFilesystem(Filesystem): """Filesystem implementation for SMB.""" - __fstype__ = "smb" + __type__ = "smb" def __init__(self, conn: SMBConnection, share_name: str, *args, **kwargs): super().__init__(None, *args, **kwargs, alt_separator="\\", case_sensitive=False) diff --git a/dissect/target/filesystems/squashfs.py b/dissect/target/filesystems/squashfs.py index 8d4b7bacf..af378a242 100644 --- a/dissect/target/filesystems/squashfs.py +++ b/dissect/target/filesystems/squashfs.py @@ -15,7 +15,7 @@ class SquashFSFilesystem(Filesystem): - __fstype__ = "squashfs" + __type__ = "squashfs" def __init__(self, fh: BinaryIO, *args, **kwargs): super().__init__(fh, *args, **kwargs) diff --git a/dissect/target/filesystems/tar.py b/dissect/target/filesystems/tar.py index 6b7029f19..2770bfa6b 100644 --- a/dissect/target/filesystems/tar.py +++ b/dissect/target/filesystems/tar.py @@ -28,7 +28,7 @@ class TarFilesystem(Filesystem): """Filesystem implementation for tar files.""" - __fstype__ = "tar" + __type__ = "tar" def __init__( self, diff --git a/dissect/target/filesystems/vmfs.py b/dissect/target/filesystems/vmfs.py index 17ddda4cc..64503b43a 100644 --- a/dissect/target/filesystems/vmfs.py +++ b/dissect/target/filesystems/vmfs.py @@ -16,7 +16,7 @@ class VmfsFilesystem(Filesystem): - __fstype__ = "vmfs" + __type__ = "vmfs" def __init__(self, fh: BinaryIO, *args, **kwargs): super().__init__(fh, *args, **kwargs) diff --git a/dissect/target/filesystems/xfs.py b/dissect/target/filesystems/xfs.py index c966d0394..7756d54e6 100644 --- a/dissect/target/filesystems/xfs.py +++ b/dissect/target/filesystems/xfs.py @@ -18,7 +18,7 @@ class XfsFilesystem(Filesystem): - __fstype__ = "xfs" + __type__ = "xfs" def __init__(self, fh: BinaryIO, *args, **kwargs): super().__init__(fh, *args, **kwargs) diff --git a/dissect/target/filesystems/zip.py b/dissect/target/filesystems/zip.py index c2e4ae202..6c4d33c9d 100644 --- a/dissect/target/filesystems/zip.py +++ b/dissect/target/filesystems/zip.py @@ -28,7 +28,7 @@ class ZipFilesystem(Filesystem): See https://github.com/python/cpython/issues/82102 for more information. """ - __fstype__ = "zip" + __type__ = "zip" def __init__( self, diff --git a/dissect/target/plugins/filesystem/icat.py b/dissect/target/plugins/filesystem/icat.py index fb4f3c980..bdde44635 100644 --- a/dissect/target/plugins/filesystem/icat.py +++ b/dissect/target/plugins/filesystem/icat.py @@ -16,7 +16,7 @@ class ICatPlugin(Plugin): def check_compatible(self) -> None: filesystems = self.target.filesystems - if not any(fs.__fstype__ in self.FS_SUPPORTED for fs in filesystems): + if not any(fs.__type__ in self.FS_SUPPORTED for fs in filesystems): raise UnsupportedPluginError("No supported filesystems found") @arg("--segment", "--inode", "-i", dest="inum", required=True, type=int, help="MFT segment or inode number") @@ -72,14 +72,14 @@ def icat(self, inum, fs, ads): ) return - if filesystem.__fstype__ == "ntfs" or open_as == "ntfs": + if filesystem.__type__ == "ntfs" or open_as == "ntfs": fh = filesystem.ntfs.mft(inum).open(ads) - elif filesystem.__fstype__ == "ext": + elif filesystem.__type__ == "ext": fh = filesystem.extfs.get_inode(inum).open() - elif filesystem.__fstype__ == "xfs": + elif filesystem.__type__ == "xfs": fh = filesystem.xfs.get_inode(inum).open() else: - self.target.log.exception('Unsupported FS type "%s"', filesystem.__fstype__) + self.target.log.exception('Unsupported FS type "%s"', filesystem.__type__) return shutil.copyfileobj(fh, sys.stdout.buffer) diff --git a/dissect/target/plugins/filesystem/ntfs/mft.py b/dissect/target/plugins/filesystem/ntfs/mft.py index 093421281..b1ed3f673 100644 --- a/dissect/target/plugins/filesystem/ntfs/mft.py +++ b/dissect/target/plugins/filesystem/ntfs/mft.py @@ -105,7 +105,7 @@ class MftPlugin(Plugin): def check_compatible(self) -> None: - ntfs_filesystems = [fs for fs in self.target.filesystems if fs.__fstype__ == "ntfs"] + ntfs_filesystems = [fs for fs in self.target.filesystems if fs.__type__ == "ntfs"] if not len(ntfs_filesystems): raise UnsupportedPluginError("No NTFS filesystems found") @@ -133,7 +133,7 @@ def mft(self, compact: bool = False): record_formatter = formatter for fs in self.target.filesystems: - if fs.__fstype__ != "ntfs": + if fs.__type__ != "ntfs": continue drive_letter = get_drive_letter(self.target, fs) diff --git a/dissect/target/plugins/filesystem/ntfs/mft_timeline.py b/dissect/target/plugins/filesystem/ntfs/mft_timeline.py index 4f7c5252f..4f79f691e 100644 --- a/dissect/target/plugins/filesystem/ntfs/mft_timeline.py +++ b/dissect/target/plugins/filesystem/ntfs/mft_timeline.py @@ -94,7 +94,7 @@ def format_info( class MftTimelinePlugin(Plugin): def check_compatible(self) -> None: - ntfs_filesystems = [fs for fs in self.target.filesystems if fs.__fstype__ == "ntfs"] + ntfs_filesystems = [fs for fs in self.target.filesystems if fs.__type__ == "ntfs"] if not len(ntfs_filesystems): raise UnsupportedPluginError("No MFT timelines found") @@ -109,7 +109,7 @@ def mft_timeline(self, ignore_dos: bool = False): - https://docs.microsoft.com/en-us/windows/win32/fileio/master-file-table """ for fs in self.target.filesystems: - if fs.__fstype__ != "ntfs": + if fs.__type__ != "ntfs": continue drive_letter = get_drive_letter(self.target, fs) diff --git a/dissect/target/plugins/filesystem/ntfs/usnjrnl.py b/dissect/target/plugins/filesystem/ntfs/usnjrnl.py index 5d4cfe6c1..d9fe6b1e2 100644 --- a/dissect/target/plugins/filesystem/ntfs/usnjrnl.py +++ b/dissect/target/plugins/filesystem/ntfs/usnjrnl.py @@ -41,7 +41,7 @@ def usnjrnl(self) -> Iterator[UsnjrnlRecord]: """ target = self.target for fs in self.target.filesystems: - if fs.__fstype__ != "ntfs": + if fs.__type__ != "ntfs": continue usnjrnl = fs.ntfs.usnjrnl diff --git a/dissect/target/plugins/filesystem/walkfs.py b/dissect/target/plugins/filesystem/walkfs.py index 2e40722db..a56ee728f 100644 --- a/dissect/target/plugins/filesystem/walkfs.py +++ b/dissect/target/plugins/filesystem/walkfs.py @@ -58,7 +58,7 @@ def generate_record(target, entry, idx): mode=stat.st_mode, uid=stat.st_uid, gid=stat.st_gid, - fstype=entry.get().fs.__fstype__, + fstype=entry.get().fs.__type__, fsidx=idx, _target=target, ) diff --git a/dissect/target/plugins/os/unix/_os.py b/dissect/target/plugins/os/unix/_os.py index f9e4edd85..752680a0f 100644 --- a/dissect/target/plugins/os/unix/_os.py +++ b/dissect/target/plugins/os/unix/_os.py @@ -185,12 +185,12 @@ def _add_mounts(self) -> None: last_mount = None if dev_id: - if volume.fs.__fstype__ == "xfs": + if volume.fs.__type__ == "xfs": fs_id = volume.fs.xfs.uuid - elif volume.fs.__fstype__ == "ext": + elif volume.fs.__type__ == "ext": fs_id = volume.fs.extfs.uuid last_mount = volume.fs.extfs.last_mount - elif volume.fs.__fstype__ == "fat": + elif volume.fs.__type__ == "fat": fs_id = volume.fs.fatfs.volume_id # This normalizes fs_id to comply with libblkid generated UUIDs # This is needed because FAT filesystems don't have a real UUID, diff --git a/dissect/target/plugins/os/unix/linux/esxi/_os.py b/dissect/target/plugins/os/unix/linux/esxi/_os.py index 164dd7f65..e487cd5a9 100644 --- a/dissect/target/plugins/os/unix/linux/esxi/_os.py +++ b/dissect/target/plugins/os/unix/linux/esxi/_os.py @@ -241,7 +241,7 @@ def _mount_filesystems(target: Target, sysvol: Filesystem, cfg: dict[str, str]): osdata_fs = None locker_fs = None for fs in target.filesystems: - if fs.__fstype__ == "fat": + if fs.__type__ == "fat": fs.volume.seek(512) magic, uuid1, uuid2, uuid3, uuid4 = struct.unpack("<16sIIH6s", fs.volume.read(32)) if magic != b"VMWARE FAT16 ": @@ -273,7 +273,7 @@ def _mount_filesystems(target: Target, sysvol: Filesystem, cfg: dict[str, str]): target.fs.symlink(f"/vmfs/volumes/{fs_uuid}", "/store") target.fs.symlink("/store", "/locker") - elif fs.__fstype__ == "vmfs": + elif fs.__type__ == "vmfs": target.fs.mount(f"/vmfs/volumes/{fs.vmfs.uuid}", fs) target.fs.symlink(f"/vmfs/volumes/{fs.vmfs.uuid}", f"/vmfs/volumes/{fs.vmfs.label}") diff --git a/dissect/target/plugins/os/windows/syscache.py b/dissect/target/plugins/os/windows/syscache.py index 46a209f62..29e8b5905 100644 --- a/dissect/target/plugins/os/windows/syscache.py +++ b/dissect/target/plugins/os/windows/syscache.py @@ -48,7 +48,7 @@ def syscache(self): # Try to get the system volume mft = None sysvol = self.target.fs.mounts["sysvol"] - if sysvol.__fstype__ == "ntfs" or hasattr(sysvol, "ntfs"): # Nasty TarLoader hack + if sysvol.__type__ == "ntfs" or hasattr(sysvol, "ntfs"): # Nasty TarLoader hack mft = sysvol.ntfs.mft # There's some other stuff here like an IndexTable and LruList diff --git a/dissect/target/tools/shell.py b/dissect/target/tools/shell.py index 25798f974..7fa61f438 100644 --- a/dissect/target/tools/shell.py +++ b/dissect/target/tools/shell.py @@ -449,7 +449,7 @@ def scandir(self, path: str, color: bool = False) -> list[tuple[fsutil.TargetPat # entries has an alternative data stream and also list them. entry = file_.get() if isinstance(entry, RootFilesystemEntry): - if entry.entries.fs.__fstype__ == "ntfs": + if entry.entries.fs.__type__ == "ntfs": attrs = entry.lattr() for data_stream in attrs.DATA: if data_stream.name != "": diff --git a/tests/_data/registration/filesystem.py b/tests/_data/registration/filesystem.py index fb3d1ef51..97439115f 100644 --- a/tests/_data/registration/filesystem.py +++ b/tests/_data/registration/filesystem.py @@ -5,7 +5,7 @@ class TestFilesystem(Filesystem): - __fstype__: str = "Data" + __type__: str = "Data" def __init__( self, case_sensitive: bool = True, alt_separator: Optional[str] = None, volume: Optional[Volume] = None