pub fn need_load_file_data(&self, offset: usize, len: usize) -> bool {
        debug_assert_eq!(
            self.attr.kind,
            SFlag::S_IFREG,
            "fobidden to check non-file node need load data or not",
        );

        if offset > self.attr.size.cast() {
            return false;
        }

        match self.data {
            NodeData::RegFile(ref cache) => {
                let file_cache = cache.get_file_cache(self.full_path.as_bytes(), offset, len);
                file_cache.is_empty()
                    || file_cache.iter().filter(|b| !(*b).can_convert()).count() != 0
            }
            NodeData::Directory(..) | NodeData::SymLink(..) => {
                panic!("need_load_file_data should handle regular file")
            }
        }
    }
/// Check whether to load file content data or not
Check whether to load file content data or not
Check whether to load file content data or not
pub fn need_load_file_data(&self, offset: usize, len: usize) -> bool {
        debug_assert_eq!(
            self.attr.kind,
            SFlag::S_IFREG,
            "fobidden to check non-file node need load data or not",
        );
        if offset > self.attr.size.cast() {
            return false;
        }
        match self.data {
            NodeData::RegFile(ref cache) => {
                let file_cache = cache.get_file_cache(self.full_path.as_bytes(), offset, len);
                file_cache.is_empty()
                    || file_cache.iter().filter(|b| !(*b).can_convert()).count() != 0
            }
            NodeData::Directory(..) | NodeData::SymLink(..) => {
                panic!("need_load_file_data should handle regular file")
            }
        }
    }
pub fn need_load_file_data ( & self , offset : usize , len : usize ) -> bool { debug_assert_eq ! ( self attr kind SFlag S_IFREG " " ) ; if offset > self . attr . size . cast ( ) { return false ; } match self . data { NodeData :: RegFile ( ref cache ) => { let file_cache = cache . get_file_cache ( self . full_path . as_bytes ( ) , offset , len ) ; file_cache . is_empty ( ) || file_cache . iter ( ) . filter ( | b | ! ( * b ) . can_convert ( ) ) . count ( ) != 0 } NodeData :: Directory ( .. ) | NodeData :: SymLink ( .. ) => { panic ! ( " " ) } } }
Check whether to load file content data or not
Check whether to load file content data or not
&self
offset
usize
len
usize
&self
offset
usize
len
usize