Lines Matching refs:file
63 assert_eq!(stats.st_size, 0); // size is 0 because we did not write anything to the file
65 assert!(stats.st_blocks <= 16); // Up to 16 blocks can be allocated for a blank file
86 assert!(stats.st_size > 0); // size is > 0 because it points to another file
89 // st_blocks depends on whether the machine's file system uses fast
101 let file = File::create(&filename).unwrap();
106 let fstat_result = fstat(file.as_raw_fd());
138 // since it's a regular file
153 let file = File::create(&filename).unwrap();
158 fchmod(file.as_raw_fd(), mode1).unwrap();
165 fchmod(file.as_raw_fd(), mode2).unwrap();
203 /// Asserts that the atime and mtime in a file's metadata match expected values.
205 /// The atime and mtime are expressed with a resolution of seconds because some file systems
227 let fullpath = tempdir.path().join("file");
272 let fullpath = tempdir.path().join("file");