Trait base::FileGetLen

source ·
pub trait FileGetLen {
    // Required method
    fn get_len(&self) -> Result<u64>;
}
Expand description

A trait for getting the size of a file. This is equivalent to File’s metadata().len() method, but wrapped in a trait so that it can be implemented for other types.

Required Methods§

source

fn get_len(&self) -> Result<u64>

Get the current length of the file in bytes.

Implementations on Foreign Types§

source§

impl FileGetLen for File

source§

fn get_len(&self) -> Result<u64>

Implementors§