ADDED: file_modification_time/2, obtaining a time stamp.

This addresses a remaining aspect of #511.
This commit is contained in:
Markus Triska
2020-07-16 22:56:10 +02:00
parent 0f4667d942
commit 4f386b3e5e
3 changed files with 49 additions and 13 deletions

View File

@@ -179,6 +179,7 @@ pub enum SystemClauseType {
DeleteFile,
WorkingDirectory,
PathCanonical,
FileModificationTime,
DeleteAttribute,
DeleteHeadAttribute,
DynamicModuleResolution(usize),
@@ -347,6 +348,7 @@ impl SystemClauseType {
&SystemClauseType::DeleteFile => clause_name!("$delete_file"),
&SystemClauseType::WorkingDirectory => clause_name!("$working_directory"),
&SystemClauseType::PathCanonical => clause_name!("$path_canonical"),
&SystemClauseType::FileModificationTime => clause_name!("$file_modification_time"),
&SystemClauseType::REPL(REPLCodePtr::CompileBatch) => clause_name!("$compile_batch"),
&SystemClauseType::REPL(REPLCodePtr::UseModule) => clause_name!("$use_module"),
&SystemClauseType::REPL(REPLCodePtr::UseQualifiedModule) => {
@@ -684,6 +686,7 @@ impl SystemClauseType {
("$delete_file", 1) => Some(SystemClauseType::DeleteFile),
("$working_directory", 2) => Some(SystemClauseType::WorkingDirectory),
("$path_canonical", 2) => Some(SystemClauseType::PathCanonical),
("$file_modification_time", 2) => Some(SystemClauseType::FileModificationTime),
("$use_module", 1) => Some(SystemClauseType::REPL(REPLCodePtr::UseModule)),
("$use_module_from_file", 1) =>
Some(SystemClauseType::REPL(REPLCodePtr::UseModuleFromFile)),