Lines Matching refs:len
173 fn truncate(&self, len: usize) -> Result<(), SystemError> { in truncate()
182 if inode.data.len() > len { in truncate()
183 inode.data.resize(len, 0); in truncate()
203 len: usize, in read_at()
207 if buf.len() < len { in read_at()
218 let start = inode.data.len().min(offset); in read_at()
219 let end = inode.data.len().min(offset + len); in read_at()
222 if buf.len() < (end - start) { in read_at()
228 buf[0..src.len()].copy_from_slice(src); in read_at()
229 return Ok(src.len()); in read_at()
235 len: usize, in write_at()
239 if buf.len() < len { in write_at()
254 if offset + len > data.len() { in write_at()
255 data.resize(offset + len, 0); in write_at()
258 let target = &mut data[offset..offset + len]; in write_at()
259 target.copy_from_slice(&buf[0..len]); in write_at()
260 return Ok(len); in write_at()
274 metadata.size = inode.data.len() as i64; in metadata()
291 fn resize(&self, len: usize) -> Result<(), SystemError> { in resize()
294 inode.data.resize(len, 0); in resize()
533 match key.len() { in get_entry_name()
536 …y_len}>1, current inode_id={inode_id:?}, to find={to_find:?}", key_len=key.len(), inode_id = inode… in get_entry_name()