[][src]Struct arrsync::File

pub struct File {
    pub path: Vec<u8>,
    pub symlink: Option<Vec<u8>>,
    pub size: u64,
    pub mtime: Option<DateTime<Utc>>,
    // some fields omitted
}

Information about a file on the rsync server

Fields

path: Vec<u8>

Path as returned by the server Take care to normalize it

symlink: Option<Vec<u8>>

Symlink target, if is_symlink

size: u64

File size in bytes

mtime: Option<DateTime<Utc>>

Modification time. Range is limited as it is parsed from an i32

Implementations

impl File[src]

pub fn unix_mode(&self) -> u32[src]

e.g. the unix_mode crate is useful for parsing

pub fn is_file(&self) -> bool[src]

A regular file?

pub fn is_directory(&self) -> bool[src]

A directory?

A symlink? symlink will be Some.

Trait Implementations

impl Clone for File[src]

impl Debug for File[src]

impl Display for File[src]

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>[src]

Print as if we're doing ls -l

Auto Trait Implementations

impl RefUnwindSafe for File

impl Send for File

impl Sync for File

impl Unpin for File

impl UnwindSafe for File

Blanket Implementations

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

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

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

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.