dissect.apfs 1.1__tar.gz → 1.1.dev2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. {dissect_apfs-1.1/dissect.apfs.egg-info → dissect_apfs-1.1.dev2}/PKG-INFO +1 -1
  2. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/fs.py +9 -9
  3. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2/dissect.apfs.egg-info}/PKG-INFO +1 -1
  4. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/pyproject.toml +1 -0
  5. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/tests/test_apfs.py +0 -10
  6. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/COPYRIGHT +0 -0
  7. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/LICENSE +0 -0
  8. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/MANIFEST.in +0 -0
  9. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/README.md +0 -0
  10. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/__init__.py +0 -0
  11. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/apfs.py +0 -0
  12. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/c_apfs.py +0 -0
  13. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/c_apfs.pyi +0 -0
  14. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/cursor.py +0 -0
  15. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/exception.py +0 -0
  16. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/__init__.py +0 -0
  17. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/base.py +0 -0
  18. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/btree.py +0 -0
  19. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/btree_node.py +0 -0
  20. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/checkpoint_map.py +0 -0
  21. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/efi_jumpstart.py +0 -0
  22. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/er_recovery_block.py +0 -0
  23. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/er_state.py +0 -0
  24. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/gbitmap.py +0 -0
  25. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/gbitmap_block.py +0 -0
  26. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/integrity_meta.py +0 -0
  27. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/keybag.py +0 -0
  28. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/nx_fusion_wbc.py +0 -0
  29. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/nx_fusion_wbc_list.py +0 -0
  30. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/nx_reap_list.py +0 -0
  31. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/nx_reaper.py +0 -0
  32. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/nx_superblock.py +0 -0
  33. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/omap.py +0 -0
  34. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/snap_meta_ext.py +0 -0
  35. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/spaceman.py +0 -0
  36. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/spaceman_bitmap.py +0 -0
  37. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/spaceman_cab.py +0 -0
  38. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/objects/spaceman_cib.py +0 -0
  39. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/stream.py +0 -0
  40. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect/apfs/util.py +0 -0
  41. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect.apfs.egg-info/SOURCES.txt +0 -0
  42. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect.apfs.egg-info/dependency_links.txt +0 -0
  43. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect.apfs.egg-info/requires.txt +0 -0
  44. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/dissect.apfs.egg-info/top_level.txt +0 -0
  45. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/setup.cfg +0 -0
  46. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/tests/__init__.py +0 -0
  47. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/tests/_data/case_insensitive.bin.gz +0 -0
  48. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/tests/_data/case_insensitive_beta.bin.gz +0 -0
  49. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/tests/_data/case_sensitive.bin.gz +0 -0
  50. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/tests/_data/case_sensitive_beta.bin.gz +0 -0
  51. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/tests/_data/corrupt.bin.gz +0 -0
  52. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/tests/_data/encrypted.bin.gz +0 -0
  53. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/tests/_data/jhfs_converted.bin.gz +0 -0
  54. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/tests/_data/jhfs_encrypted.bin.gz +0 -0
  55. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/tests/_data/snapshot.bin.gz +0 -0
  56. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/tests/_docs/Makefile +0 -0
  57. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/tests/_docs/__init__.py +0 -0
  58. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/tests/_docs/conf.py +0 -0
  59. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/tests/_docs/index.rst +0 -0
  60. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/tests/conftest.py +0 -0
  61. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/tests/test_exception.py +0 -0
  62. {dissect_apfs-1.1 → dissect_apfs-1.1.dev2}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dissect.apfs
3
- Version: 1.1
3
+ Version: 1.1.dev2
4
4
  Summary: A Dissect module implementing a parser for the APFS file system, a commonly used Apple file system
5
5
  Author-email: Dissect Team <dissect@fox-it.com>
6
6
  License-Expression: AGPL-3.0-or-later
@@ -792,27 +792,27 @@ class DirectoryEntry:
792
792
  @cached_property
793
793
  def type(self) -> int:
794
794
  """The file type of this directory entry."""
795
- return (self.value.flags & c_apfs.DREC_TYPE_MASK) << 12
795
+ return self.value.flags & c_apfs.DREC_TYPE_MASK << 12
796
796
 
797
797
  def is_dir(self) -> bool:
798
798
  """Return whether this directory entry is a directory."""
799
- return stat.S_ISDIR(self.type)
799
+ return stat.S_ISDIR(self.type << 12)
800
800
 
801
801
  def is_file(self) -> bool:
802
802
  """Return whether this directory entry is a regular file."""
803
- return stat.S_ISREG(self.type)
803
+ return stat.S_ISREG(self.type << 12)
804
804
 
805
805
  def is_symlink(self) -> bool:
806
806
  """Return whether this directory entry is a symbolic link."""
807
- return stat.S_ISLNK(self.type)
807
+ return stat.S_ISLNK(self.type << 12)
808
808
 
809
809
  def is_block_device(self) -> bool:
810
810
  """Return whether this directory entry is a block device."""
811
- return stat.S_ISBLK(self.type)
811
+ return stat.S_ISBLK(self.type << 12)
812
812
 
813
813
  def is_character_device(self) -> bool:
814
814
  """Return whether this directory entry is a character device."""
815
- return stat.S_ISCHR(self.type)
815
+ return stat.S_ISCHR(self.type << 12)
816
816
 
817
817
  def is_device(self) -> bool:
818
818
  """Return whether this directory entry is a device (block or character)."""
@@ -820,15 +820,15 @@ class DirectoryEntry:
820
820
 
821
821
  def is_fifo(self) -> bool:
822
822
  """Return whether this directory entry is a FIFO."""
823
- return stat.S_ISFIFO(self.type)
823
+ return stat.S_ISFIFO(self.type << 12)
824
824
 
825
825
  def is_socket(self) -> bool:
826
826
  """Return whether this directory entry is a socket."""
827
- return stat.S_ISSOCK(self.type)
827
+ return stat.S_ISSOCK(self.type << 12)
828
828
 
829
829
  def is_whiteout(self) -> bool:
830
830
  """Return whether this directory entry is a whiteout."""
831
- return stat.S_ISWHT(self.type)
831
+ return stat.S_ISWHT(self.type << 12)
832
832
 
833
833
 
834
834
  class XAttr:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dissect.apfs
3
- Version: 1.1
3
+ Version: 1.1.dev2
4
4
  Summary: A Dissect module implementing a parser for the APFS file system, a commonly used Apple file system
5
5
  Author-email: Dissect Team <dissect@fox-it.com>
6
6
  License-Expression: AGPL-3.0-or-later
@@ -122,3 +122,4 @@ known-third-party = ["dissect"]
122
122
  include = ["dissect.*"]
123
123
 
124
124
  [tool.setuptools_scm]
125
+ local_scheme = "no-local-version"
@@ -36,11 +36,6 @@ def _assert_apfs_content(volume: FS, beta: bool) -> None:
36
36
  ]
37
37
  )
38
38
 
39
- # Test direntry parsing
40
- assert node.listdir()["dir"].is_dir()
41
- assert node.listdir()["hardlink"].is_file()
42
- assert node.listdir()["symlink-dir"].is_symlink()
43
-
44
39
  # Empty file
45
40
  node = volume.get("empty")
46
41
  assert node.name == "empty"
@@ -245,9 +240,6 @@ def _assert_apfs_content(volume: FS, beta: bool) -> None:
245
240
 
246
241
  if ".HFS+ Private Directory Data\r" not in volume.get("/").listdir() and not beta:
247
242
  # Special files
248
- dirents = volume.get("dir").listdir()
249
- assert dirents["blockdev"].is_block_device()
250
-
251
243
  node = volume.get("dir/blockdev")
252
244
  assert node.name == "blockdev"
253
245
  assert node.is_block_device()
@@ -271,8 +263,6 @@ def _assert_apfs_content(volume: FS, beta: bool) -> None:
271
263
  "chardev-svr4",
272
264
  "chardev-ultrix",
273
265
  ]:
274
- assert dirents[name].is_character_device()
275
-
276
266
  node = volume.get(f"dir/{name}")
277
267
  assert node.name == name
278
268
  assert node.is_character_device()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes