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

Method is_apfs

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

Source from the content-addressed store, hash-verified

164 return self._get_plist(disk_list)
165
166 def is_apfs(self, disk):
167 disk_id = self.get_identifier(disk)
168 if not disk_id:
169 return None
170 # Takes a disk identifier, and returns whether or not it's apfs
171 for d in self.disks.get("AllDisksAndPartitions", []):
172 if not "APFSVolumes" in d:
173 continue
174 if d.get("DeviceIdentifier", "").lower() == disk_id.lower():
175 return True
176 for a in d.get("APFSVolumes", []):
177 if a.get("DeviceIdentifier", "").lower() == disk_id.lower():
178 return True
179 return False
180
181 def is_apfs_container(self, disk):
182 disk_id = self.get_identifier(disk)

Callers 2

get_physical_storeMethod · 0.95
get_parentMethod · 0.95

Calls 1

get_identifierMethod · 0.95

Tested by

no test coverage detected