MCPcopy
hub / github.com/corpnewt/gibMacOS / is_apfs_container

Method is_apfs_container

Scripts/disk.py:181–192  ·  view source on GitHub ↗
(self, disk)

Source from the content-addressed store, hash-verified

179 return False
180
181 def is_apfs_container(self, disk):
182 disk_id = self.get_identifier(disk)
183 if not disk_id:
184 return None
185 # Takes a disk identifier, and returns whether or not that specific
186 # disk/volume is an APFS Container
187 for d in self.disks.get("AllDisksAndPartitions", []):
188 # Only check partitions
189 for p in d.get("Partitions", []):
190 if disk_id.lower() == p.get("DeviceIdentifier", "").lower():
191 return p.get("Content", "").lower() == "apple_apfs"
192 return False
193
194 def is_cs_container(self, disk):
195 disk_id = self.get_identifier(disk)

Callers 1

Calls 1

get_identifierMethod · 0.95

Tested by

no test coverage detected