Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
andreacorbellini committed Apr 9, 2024
1 parent 6e30fe7 commit 73fb1e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/imp/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ impl TemporaryFile {
let mut random_name = RandomName::new(&name);
let (file, temp_path) = loop {
let path = dir_path.join(random_name.next());
println!("open {:?}", &path);
match File::options()
.write(true)
.read(opts.read)
Expand All @@ -74,10 +75,12 @@ impl TemporaryFile {
}

pub(crate) fn rename_file(&self) -> Result<()> {
println!("mv {:?} {:?}", &self.temp_path, &self.dest_path);
fs::rename(&self.temp_path, &self.dest_path)
}

pub(crate) fn remove_file(&self) -> Result<()> {
println!("rm {:?}", &self.temp_path);
fs::remove_file(&self.temp_path)
}
}
Expand Down

0 comments on commit 73fb1e4

Please sign in to comment.