Lines Matching refs:file
112 let mut file = tempfile().unwrap();
114 assert_eq!(Ok(8), pwrite(file.as_raw_fd(), &buf, 8));
116 file.read_to_end(&mut file_content).unwrap();
129 let mut file = OpenOptions::new()
137 file.write_all(&file_content).unwrap();
140 assert_eq!(Ok(16), pread(file.as_raw_fd(), &mut buf, 16));
161 // pwritev them into a temporary file
163 let mut file = OpenOptions::new()
171 let written = pwritev(file.as_raw_fd(), &iovecs, 100).ok().unwrap();
176 file.read_to_end(&mut contents).unwrap();
192 let mut file = OpenOptions::new()
199 file.write_all(&to_write).unwrap();
209 assert_eq!(Ok(100), preadv(file.as_raw_fd(), &mut iovecs, 100));