• Home
  • Raw
  • Download

Lines Matching full:tmpfile

16     let mut tmpfile = NamedTempFile::new().unwrap();  in test_basic()  localVariable
17 write!(tmpfile, "abcde").unwrap(); in test_basic()
18 tmpfile.seek(SeekFrom::Start(0)).unwrap(); in test_basic()
20 tmpfile.read_to_string(&mut buf).unwrap(); in test_basic()
26 let tmpfile = NamedTempFile::new().unwrap(); in test_deleted() localVariable
27 let path = tmpfile.path().to_path_buf(); in test_deleted()
29 drop(tmpfile); in test_deleted()
35 let mut tmpfile = NamedTempFile::new().unwrap(); in test_persist() localVariable
36 let old_path = tmpfile.path().to_path_buf(); in test_persist()
38 write!(tmpfile, "abcde").unwrap(); in test_persist()
41 let mut f = tmpfile.persist(&persist_path).unwrap(); in test_persist()
64 let mut tmpfile = NamedTempFile::new().unwrap(); in test_persist_noclobber() localVariable
65 let old_path = tmpfile.path().to_path_buf(); in test_persist_noclobber()
68 write!(tmpfile, "abcde").unwrap(); in test_persist_noclobber()
71 tmpfile = tmpfile.persist_noclobber(&persist_path).unwrap_err().into(); in test_persist_noclobber()
76 tmpfile.persist_noclobber(&persist_path).unwrap(); in test_persist_noclobber()
88 let tmpfile = Builder::new() in test_customnamed() localVariable
94 let name = tmpfile.path().file_name().unwrap().to_str().unwrap(); in test_customnamed()
102 let mut tmpfile = Builder::new().append(true).tempfile().unwrap(); in test_append() localVariable
103 tmpfile.write(b"a").unwrap(); in test_append()
104 tmpfile.seek(SeekFrom::Start(0)).unwrap(); in test_append()
105 tmpfile.write(b"b").unwrap(); in test_append()
107 tmpfile.seek(SeekFrom::Start(0)).unwrap(); in test_append()
109 tmpfile.read_exact(&mut buf).unwrap(); in test_append()
144 let tmpfile = NamedTempFile::new().unwrap(); in test_immut() localVariable
145 (&tmpfile).write_all(b"abcde").unwrap(); in test_immut()
146 (&tmpfile).seek(SeekFrom::Start(0)).unwrap(); in test_immut()
148 (&tmpfile).read_to_string(&mut buf).unwrap(); in test_immut()
154 let mut tmpfile = NamedTempFile::new().unwrap(); in test_temppath() localVariable
155 write!(tmpfile, "abcde").unwrap(); in test_temppath()
157 let path = tmpfile.into_temp_path(); in test_temppath()
163 let mut tmpfile = NamedTempFile::new().unwrap(); in test_temppath_persist() localVariable
164 write!(tmpfile, "abcde").unwrap(); in test_temppath_persist()
166 let tmppath = tmpfile.into_temp_path(); in test_temppath_persist()
191 let mut tmpfile = NamedTempFile::new().unwrap(); in test_temppath_persist_noclobber() localVariable
192 write!(tmpfile, "abcde").unwrap(); in test_temppath_persist_noclobber()
194 let mut tmppath = tmpfile.into_temp_path(); in test_temppath_persist_noclobber()
273 let tmpfile = NamedTempFile::new_in(".").unwrap(); in test_change_dir() localVariable
274 let path = env::current_dir().unwrap().join(tmpfile.path()); in test_change_dir()
276 drop(tmpfile); in test_change_dir()
303 let mut tmpfile = NamedTempFile::new().unwrap(); in test_keep() localVariable
304 write!(tmpfile, "abcde").unwrap(); in test_keep()
305 let (mut f, temp_path) = tmpfile.into_parts(); in test_keep()