Add rename_file/2 predicate to the files library

This commit is contained in:
Paulo Moura
2021-05-18 18:08:30 +01:00
parent 0eeae24049
commit 58555d598b
3 changed files with 22 additions and 0 deletions

View File

@@ -175,6 +175,7 @@ pub(crate) enum SystemClauseType {
MakeDirectory,
MakeDirectoryPath,
DeleteFile,
RenameFile,
DeleteDirectory,
WorkingDirectory,
PathCanonical,
@@ -338,6 +339,7 @@ impl SystemClauseType {
&SystemClauseType::MakeDirectory => clause_name!("$make_directory"),
&SystemClauseType::MakeDirectoryPath => clause_name!("$make_directory_path"),
&SystemClauseType::DeleteFile => clause_name!("$delete_file"),
&SystemClauseType::RenameFile => clause_name!("$rename_file"),
&SystemClauseType::DeleteDirectory => clause_name!("$delete_directory"),
&SystemClauseType::WorkingDirectory => clause_name!("$working_directory"),
&SystemClauseType::PathCanonical => clause_name!("$path_canonical"),
@@ -749,6 +751,7 @@ impl SystemClauseType {
("$make_directory", 1) => Some(SystemClauseType::MakeDirectory),
("$make_directory_path", 1) => Some(SystemClauseType::MakeDirectoryPath),
("$delete_file", 1) => Some(SystemClauseType::DeleteFile),
("$rename_file", 2) => Some(SystemClauseType::RenameFile),
("$delete_directory", 1) => Some(SystemClauseType::DeleteDirectory),
("$working_directory", 2) => Some(SystemClauseType::WorkingDirectory),
("$path_canonical", 2) => Some(SystemClauseType::PathCanonical),