Struct git2::DiffFile [] [src]

pub struct DiffFile<'a> {
    // some fields omitted
}

Description of one side of a delta.

Although this is called a "file" it could represent a file, a symbolic link, a submodule commit id, or even a tree (although that only happens if you are tracking type changes or ignored/untracked directories).

Methods

impl<'a> DiffFile<'a>
[src]

fn id(&self) -> Oid

Returns the Oid of this item.

If this entry represents an absent side of a diff (e.g. the old_file of a Added delta), then the oid returned will be zeroes.

fn path_bytes(&self) -> Option<&'a [u8]>

Returns the path, in bytes, of the entry relative to the working directory of the repository.

fn path(&self) -> Option<&'a Path>

Returns the path of the entry relative to the working directory of the repository.

fn size(&self) -> u64

Returns the size of this entry, in bytes