Enum EntryType
pub enum EntryType
Indicate the type of content described by a header.
This is returned by [crate::Header::entry_type()] and should be used to
distinguish between types of content.
Variants
-
Regular Regular file
-
Link Hard link
-
Symlink Symbolic link
-
Char Character device
-
Block Block device
-
Directory Directory
-
Fifo Named pipe (fifo)
-
Continuous Implementation-defined 'high-performance' type, treated as regular file
-
GNULongName GNU extension - long file name
-
GNULongLink GNU extension - long link name (link target)
-
GNUSparse GNU extension - sparse file
-
XGlobalHeader Global extended header
-
XHeader Extended Header
Implementations
impl EntryType
fn new(byte: u8) -> EntryTypeCreates a new entry type from a raw byte.
Note that the other named constructors of entry type may be more appropriate to create a file type from.
fn as_byte(&self) -> u8Returns the raw underlying byte that this entry type represents.
fn file() -> EntryTypeCreates a new entry type representing a regular file.
fn hard_link() -> EntryTypeCreates a new entry type representing a hard link.
fn symlink() -> EntryTypeCreates a new entry type representing a symlink.
fn character_special() -> EntryTypeCreates a new entry type representing a character special device.
fn block_special() -> EntryTypeCreates a new entry type representing a block special device.
fn dir() -> EntryTypeCreates a new entry type representing a directory.
fn fifo() -> EntryTypeCreates a new entry type representing a FIFO.
fn contiguous() -> EntryTypeCreates a new entry type representing a contiguous file.
fn is_file(&self) -> boolReturns whether this type represents a regular file.
fn is_hard_link(&self) -> boolReturns whether this type represents a hard link.
fn is_symlink(&self) -> boolReturns whether this type represents a symlink.
fn is_character_special(&self) -> boolReturns whether this type represents a character special device.
fn is_block_special(&self) -> boolReturns whether this type represents a block special device.
fn is_dir(&self) -> boolReturns whether this type represents a directory.
fn is_fifo(&self) -> boolReturns whether this type represents a FIFO.
fn is_contiguous(&self) -> boolReturns whether this type represents a contiguous file.
fn is_gnu_longname(&self) -> boolReturns whether this type represents a GNU long name header.
fn is_gnu_sparse(&self) -> boolReturns whether this type represents a GNU sparse header.
fn is_gnu_longlink(&self) -> boolReturns whether this type represents a GNU long link header.
fn is_pax_global_extensions(&self) -> boolReturns whether this type represents PAX global extensions, that should affect all following entries. For more, see PAX.
fn is_pax_local_extensions(&self) -> boolReturns whether this type represents PAX local extensions; these only affect the current entry. For more, see PAX.
Trait Implementations
impl Clone for EntryType
fn clone(&self) -> Self
impl Copy for EntryType
impl Debug for EntryType
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for EntryType
impl PartialEq for EntryType
fn eq(&self, other: &Self) -> bool