[][src]Struct arq::tree::Node

pub struct Node {
    pub is_tree: bool,
    pub tree_contains_missing_items: bool,
    pub data_compression_type: CompressionType,
    pub xattrs_compression_type: CompressionType,
    pub acl_compression_type: CompressionType,
    pub data_blob_keys: Vec<BlobKey>,
    pub data_size: u64,
    pub xattrs_blob_key: Option<BlobKey>,
    pub xattrs_size: u64,
    pub acl_blob_key: Option<BlobKey>,
    pub uid: i32,
    pub gid: i32,
    pub mode: i32,
    pub mtime_sec: i64,
    pub mtime_nsec: i64,
    pub flags: i64,
    pub finder_flags: i32,
    pub extended_finder_flags: i32,
    pub finder_file_type: String,
    pub finder_file_creator: String,
    pub is_file_extension_hidden: bool,
    pub st_dev: i32,
    pub st_ino: i32,
    pub st_nlink: u32,
    pub st_rdev: i32,
    pub ctime_sec: i64,
    pub ctime_nsec: i64,
    pub create_time_sec: i64,
    pub create_time_nsec: i64,
    pub st_blocks: i64,
    pub st_blksize: u32,
}

Node

Each Node contains the following bytes:

    [Bool:isTree]
    [Bool:treeContainsMissingItems] /* present for Tree version >= 18 */
    [Bool:data_are_compressed] /* present for Tree versions 12-18 */
    [CompressionType:data_compression_type] /* present for Tree version >= 19; indicates Gzip compression or none */
    [Bool:xattrs_are_compressed] /* present for Tree versions 12-18 */
    [CompressionType:xattrs_compression_type] /* present for Tree version >= 19; indicates Gzip compression or none */
    [Bool:acl_is_compressed] /* present for Tree versions 12-18 */
    [CompressionType:acl_compression_type] /* present for Tree version >= 19; indicates Gzip compression or none */
    [Int32:data_blob_keys_count]
    (
        [BlobKey:data_blob_key]
    )   /* repeat <data_blob_keys_count> times */
    [UIn64:data_size]
    [String:"<thumbnail sha1>"] /* only present for Tree version 18 or earlier (never used) */
    [Bool:is_thumbnail_encryption_key_stretched] /* only present for Tree version 14 to 18 */
    [String:"<preview sha1>"] /* only present for Tree version 18 or earlier (never used) */
    [Bool:is_preview_encryption_key_stretched] /* only present for Tree version 14 to 18 */
    [BlobKey:xattrs_blob_key] /* null if file has no xattrs */
    [UInt64:xattrs_size]
    [BlobKey:acl_blob_key] /* null if file has no acl */
    [Int32:uid]
    [Int32:gid]
    [Int32:mode]
    [Int64:mtime_sec]
    [Int64:mtime_nsec]
    [Int64:flags]
    [Int32:finderFlags]
    [Int32:extendedFinderFlags]
    [String:"<finder file type>"]
    [String:"<finder file creator>"]
    [Bool:is_file_extension_hidden]
    [Int32:st_dev]
    [Int32:st_ino]
    [UInt32:st_nlink]
    [Int32:st_rdev]
    [Int64:ctime_sec]
    [Int64:ctime_nsec]
    [Int64:create_time_sec]
    [Int64:create_time_nsec]
    [Int64:st_blocks]
    [UInt32:st_blksize]

Notes:

  • A Node can have multiple data SHA1s if the file is very large. Arq breaks up large files into multiple blobs using a rolling checksum algorithm. This way Arq only backs up the parts of a file that have changed.

  • "<xattrs_blob_key>" is the key of a blob containing the sorted extended attributes of the file (see "XAttrSet Format" below). Note this means extended-attribute sets are "de-duplicated".

  • "<acl_blob_key>" is the SHA1 of the blob containing the result of acl_to_text() on the file's ACL. Note this means the ACLs are "de-duplicated".

  • "create_time_sec" and "create_time_nsec" contain the value of the ATTR_CMN_CRTIME attribute of the file

XAttrSet Format

Each XAttrSet blob contains the following bytes:

    58 41 74 74 72 53 65 74  56 30 30 32    "XAttrSetV002"
    [UInt64:xattr_count]
    (
        [String:"<xattr name>"] /* can't be null */
        [Data:xattr_data]
    )

Fields

is_tree: booltree_contains_missing_items: booldata_compression_type: CompressionTypexattrs_compression_type: CompressionTypeacl_compression_type: CompressionTypedata_blob_keys: Vec<BlobKey>data_size: u64xattrs_blob_key: Option<BlobKey>xattrs_size: u64acl_blob_key: Option<BlobKey>uid: i32gid: i32mode: i32mtime_sec: i64mtime_nsec: i64flags: i64finder_flags: i32extended_finder_flags: i32finder_file_type: Stringfinder_file_creator: Stringis_file_extension_hidden: boolst_dev: i32st_ino: i32st_nlink: u32st_rdev: i32ctime_sec: i64ctime_nsec: i64create_time_sec: i64create_time_nsec: i64st_blocks: i64st_blksize: u32

Methods

impl Node[src]

pub fn new<R: ArqRead + BufRead>(reader: R) -> Result<Node>[src]

Auto Trait Implementations

impl Send for Node

impl Sync for Node

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self