MCPcopy Index your code
hub / github.com/archlinux/archinstall / FilesystemType

Class FilesystemType

archinstall/lib/models/device.py:818–855  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

816
817
818class FilesystemType(StrEnum):
819 BTRFS = auto()
820 EXT2 = auto()
821 EXT3 = auto()
822 EXT4 = auto()
823 F2FS = auto()
824 FAT12 = auto()
825 FAT16 = auto()
826 FAT32 = auto()
827 NTFS = auto()
828 XFS = auto()
829 LINUX_SWAP = 'linux-swap'
830
831 # this is not a FS known to parted, so be careful
832 # with the usage from this enum
833 CRYPTO_LUKS = 'crypto_LUKS'
834
835 def is_crypto(self) -> bool:
836 return self == FilesystemType.CRYPTO_LUKS
837
838 def is_fat(self) -> bool:
839 return self in (FilesystemType.FAT12, FilesystemType.FAT16, FilesystemType.FAT32)
840
841 @property
842 def parted_value(self) -> str:
843 return self.value + '(v1)' if self == FilesystemType.LINUX_SWAP else self.value
844
845 @property
846 def installation_pkg(self) -> str | None:
847 match self:
848 case FilesystemType.BTRFS:
849 return 'btrfs-progs'
850 case FilesystemType.XFS:
851 return 'xfsprogs'
852 case FilesystemType.F2FS:
853 return 'f2fs-tools'
854 case _:
855 return None
856
857
858class ModificationStatus(StrEnum):

Callers 4

_determine_fs_typeMethod · 0.90
parse_argMethod · 0.85
parse_argMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected