Fixes #1807
Information known to macOS:
```
$ hdiutil attach apfs.img
/dev/disk1
/dev/disk2
EF57347C-0000-11AA-AA11-
0030654
/dev/disk2s1
41504653-0000-11AA-AA11-
0030654 /Volumes/testapfs
$ diskutil info disk2
Device Identifier: disk2
Device Node: /dev/disk2
Whole: Yes
Part of Whole: disk2
Device / Media Name: Disk Image
Volume Name: Not applicable (no file system)
Mounted: Not applicable (no file system)
File System: None
Content (IOContent):
EF57347C-0000-11AA-AA11-
00306543ECAC
OS Can Be Installed: No
Media Type: Generic
Protocol: Disk Image
SMART Status: Not Supported
Disk / Partition UUID:
25E5F1D3-11C0-4D36-98A5-
3F66953519B9
Disk Size: 10.5 MB (
10485760 Bytes) (exactly 20480 512-Byte-Units)
Device Block Size: 4096 Bytes
Read-Only Media: No
Read-Only Volume: Not applicable (no file system)
Device Location: External
Removable Media: Removable
Media Removal: Software-Activated
Virtual: Yes
$ diskutil info disk2s1
Device Identifier: disk2s1
Device Node: /dev/disk2s1
Whole: No
Part of Whole: disk2
Volume Name: testapfs
Mounted: Yes
Mount Point: /Volumes/testapfs
Partition Type:
41504653-0000-11AA-AA11-
00306543ECAC
File System Personality: APFS
Type (Bundle): apfs
Name (User Visible): APFS
Owners: Disabled
OS Can Be Installed: Yes
Media Type: Generic
Protocol: Disk Image
SMART Status: Not Supported
Volume UUID:
3EA5C1EF-64CB-447C-AE37-
8046CDC35010
Disk / Partition UUID:
3EA5C1EF-64CB-447C-AE37-
8046CDC35010
Disk Size: 10.5 MB (
10485760 Bytes) (exactly 20480 512-Byte-Units)
Device Block Size: 4096 Bytes
Volume Total Space: 10.5 MB (
10485760 Bytes) (exactly 20480 512-Byte-Units)
Volume Used Space: 376.8 KB (376832 Bytes) (exactly 736 512-Byte-Units) (3.6%)
Volume Free Space: 10.1 MB (
10108928 Bytes) (exactly 19744 512-Byte-Units) (96.4%)
Allocation Block Size: 4096 Bytes
Read-Only Media: No
Read-Only Volume: No
Device Location: External
Removable Media: Removable
Media Removal: Software-Activated
```