@@ -792,43 +792,43 @@ def dt(self) -> c_apfs.DT:
792792 @cached_property
793793 def type (self ) -> int :
794794 """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
796796
797797 def is_dir (self ) -> bool :
798798 """Return whether this directory entry is a directory."""
799- return stat .S_ISDIR (self .type << 12 )
799+ return stat .S_ISDIR (self .type )
800800
801801 def is_file (self ) -> bool :
802802 """Return whether this directory entry is a regular file."""
803- return stat .S_ISREG (self .type << 12 )
803+ return stat .S_ISREG (self .type )
804804
805805 def is_symlink (self ) -> bool :
806806 """Return whether this directory entry is a symbolic link."""
807- return stat .S_ISLNK (self .type << 12 )
807+ return stat .S_ISLNK (self .type )
808808
809809 def is_block_device (self ) -> bool :
810810 """Return whether this directory entry is a block device."""
811- return stat .S_ISBLK (self .type << 12 )
811+ return stat .S_ISBLK (self .type )
812812
813813 def is_character_device (self ) -> bool :
814814 """Return whether this directory entry is a character device."""
815- return stat .S_ISCHR (self .type << 12 )
815+ return stat .S_ISCHR (self .type )
816816
817817 def is_device (self ) -> bool :
818818 """Return whether this directory entry is a device (block or character)."""
819819 return self .is_block_device () or self .is_character_device ()
820820
821821 def is_fifo (self ) -> bool :
822822 """Return whether this directory entry is a FIFO."""
823- return stat .S_ISFIFO (self .type << 12 )
823+ return stat .S_ISFIFO (self .type )
824824
825825 def is_socket (self ) -> bool :
826826 """Return whether this directory entry is a socket."""
827- return stat .S_ISSOCK (self .type << 12 )
827+ return stat .S_ISSOCK (self .type )
828828
829829 def is_whiteout (self ) -> bool :
830830 """Return whether this directory entry is a whiteout."""
831- return stat .S_ISWHT (self .type << 12 )
831+ return stat .S_ISWHT (self .type )
832832
833833
834834class XAttr :
0 commit comments