Lines Matching refs:offset
85 offset: u64, in read()
87 if offset >= self.size() { in read()
92 let start_cluster_number: u64 = offset / fs.bytes_per_cluster(); in read()
102 let bytes_remain: u64 = self.size() - offset; in read()
105 let mut in_cluster_offset: u64 = offset % fs.bytes_per_cluster(); in read()
132 let offset = fs.cluster_bytes_offset(current_cluster) + in_cluster_offset; in read() localVariable
134 offset as usize, in read()
162 offset: u64, in write()
164 self.ensure_len(fs, offset, buf.len() as u64)?; in write()
167 let start_cluster_num = offset / fs.bytes_per_cluster(); in write()
177 let mut in_cluster_bytes_offset: u64 = offset % fs.bytes_per_cluster(); in write()
199 let offset = fs.cluster_bytes_offset(current_cluster) + in_cluster_bytes_offset; in write() localVariable
202 offset as usize, in write()
232 offset: u64, in ensure_len()
236 if offset + len <= self.size() { in ensure_len()
249 let extra_bytes = min((offset + len) - self.size(), MAX_FILE_SIZE - self.size()); in ensure_len()
279 if offset > self.size() { in ensure_len()
291 let cluster_offset_start = offset / fs.bytes_per_cluster(); in ensure_len()
300 self.zero_range(fs, start_offset, start_offset + offset - self.size())?; in ensure_len()
391 offset: self.root_offset.unwrap_or(0), in to_iter()
422 let mut offset = self.root_offset.unwrap_or(0); in find_free_entries() localVariable
428 if offset >= fs.bytes_per_cluster() && !self.is_root() { in find_free_entries()
433 offset = offset % fs.bytes_per_cluster(); in find_free_entries()
440 if self.is_root() && offset > fs.root_dir_end_bytes_offset().unwrap() { in find_free_entries()
444 let e_offset = fs.cluster_bytes_offset(current_cluster) + offset; in find_free_entries()
450 first_free = Some((current_cluster, offset)); in find_free_entries()
465 offset += FATRawDirEntry::DIR_ENTRY_LEN; in find_free_entries()
621 let mut offset = 0; in create_dir() localVariable
629 dot_entry.flush(&fs, fs.cluster_bytes_offset(first_cluster) + offset)?; in create_dir()
633 offset += FATRawDirEntry::DIR_ENTRY_LEN; in create_dir()
643 dot_dot_entry.flush(&fs, fs.cluster_bytes_offset(first_cluster) + offset)?; in create_dir()
761 let offset = fs.cluster_bytes_offset(end.0) + end.1; localVariable
762 short_dentry.flush(&fs, offset)?;
1401 offset: u64, field
1419 return Ok((self.current_cluster, self.offset, None)); in get_dir_entry()
1423 if self.offset >= self.fs.bytes_per_cluster() && !self.is_root { in get_dir_entry()
1428 self.offset %= self.fs.bytes_per_cluster(); in get_dir_entry()
1433 return Ok((self.current_cluster, self.offset, None)); in get_dir_entry()
1440 if self.is_root && self.offset > self.fs.root_dir_end_bytes_offset().unwrap() { in get_dir_entry()
1441 return Ok((self.current_cluster, self.offset, None)); in get_dir_entry()
1445 let offset: u64 = self.fs.cluster_bytes_offset(self.current_cluster) + self.offset; in get_dir_entry() localVariable
1448 let raw_dentry: FATRawDirEntry = get_raw_dir_entry(&self.fs, offset)?; in get_dir_entry()
1456 self.offset += FATRawDirEntry::DIR_ENTRY_LEN; in get_dir_entry()
1459 self.offset, in get_dir_entry()
1462 self.offset - FATRawDirEntry::DIR_ENTRY_LEN, in get_dir_entry()
1471 let start_offset: u64 = self.offset; in get_dir_entry()
1474 self.offset += FATRawDirEntry::DIR_ENTRY_LEN; in get_dir_entry()
1481 if self.offset >= self.fs.bytes_per_cluster() && !self.is_root { in get_dir_entry()
1486 self.offset %= self.fs.bytes_per_cluster(); in get_dir_entry()
1498 && self.offset > self.fs.root_dir_end_bytes_offset().unwrap() in get_dir_entry()
1504 let offset: u64 = in get_dir_entry() localVariable
1505 self.fs.cluster_bytes_offset(self.current_cluster) + self.offset; in get_dir_entry()
1507 let raw_dentry: FATRawDirEntry = get_raw_dir_entry(&self.fs, offset)?; in get_dir_entry()
1518 self.offset += FATRawDirEntry::DIR_ENTRY_LEN; in get_dir_entry()
1532 (self.current_cluster, self.offset), in get_dir_entry()
1539 self.offset += FATRawDirEntry::DIR_ENTRY_LEN; in get_dir_entry()
1540 return Ok((self.current_cluster, self.offset, Some(d))); in get_dir_entry()
1545 self.offset += FATRawDirEntry::DIR_ENTRY_LEN; in get_dir_entry()
1551 self.offset += FATRawDirEntry::DIR_ENTRY_LEN; in get_dir_entry()
1555 return Ok((self.current_cluster, self.offset, None)); in get_dir_entry()
1568 Ok((cluster, offset, result)) => { in next()
1570 self.offset = offset; in next()