Merge pull request #1658 from aarroyoc/copy_file

Add predicate file_copy/2 in library(files)
This commit is contained in:
Mark Thom
2022-12-18 21:22:25 +01:00
committed by GitHub
4 changed files with 36 additions and 2 deletions

View File

@@ -3533,6 +3533,14 @@ impl Machine {
self.rename_file();
step_or_fail!(self, self.machine_st.p = self.machine_st.cp);
}
&Instruction::CallFileCopy(_) => {
self.file_copy();
step_or_fail!(self, self.machine_st.p += 1);
}
&Instruction::ExecuteFileCopy(_) => {
self.file_copy();
step_or_fail!(self, self.machine_st.p = self.machine_st.cp);
}
&Instruction::CallWorkingDirectory(_) => {
try_or_throw!(self.machine_st, self.working_directory());
step_or_fail!(self, self.machine_st.p += 1);