]> Repositorios git - scryer-prolog.git/commitdiff
Merge pull request #968 from pmoura/add_make_directory_path_predicate
authorMark Thom <[email protected]>
Tue, 18 May 2021 16:26:06 +0000 (10:26 -0600)
committerGitHub <[email protected]>
Tue, 18 May 2021 16:26:06 +0000 (10:26 -0600)
Add make_directory_path/1 predicate to the files library

1  2 
src/clause_types.rs
src/lib/files.pl
src/machine/system_calls.rs

index 56ce7e6c0a49a2f2372c25ec7f0b8c6801d4c8a5,15d14c308c9ec7dbd5f3b492362cda2b9555864b..4ceda2f055c1de6e3f9670917a4c5b0dc9641e0b
@@@ -173,8 -173,8 +173,9 @@@ pub(crate) enum SystemClauseType 
      DirectoryExists,
      DirectorySeparator,
      MakeDirectory,
+     MakeDirectoryPath,
      DeleteFile,
 +    DeleteDirectory,
      WorkingDirectory,
      PathCanonical,
      FileTime,
@@@ -335,8 -335,8 +336,9 @@@ impl SystemClauseType 
              &SystemClauseType::DirectoryExists => clause_name!("$directory_exists"),
              &SystemClauseType::DirectorySeparator => clause_name!("$directory_separator"),
              &SystemClauseType::MakeDirectory => clause_name!("$make_directory"),
+             &SystemClauseType::MakeDirectoryPath => clause_name!("$make_directory_path"),
              &SystemClauseType::DeleteFile => clause_name!("$delete_file"),
 +            &SystemClauseType::DeleteDirectory => clause_name!("$delete_directory"),
              &SystemClauseType::WorkingDirectory => clause_name!("$working_directory"),
              &SystemClauseType::PathCanonical => clause_name!("$path_canonical"),
              &SystemClauseType::FileTime => clause_name!("$file_time"),
              ("$directory_exists", 1) => Some(SystemClauseType::DirectoryExists),
              ("$directory_separator", 1) => Some(SystemClauseType::DirectorySeparator),
              ("$make_directory", 1) => Some(SystemClauseType::MakeDirectory),
+             ("$make_directory_path", 1) => Some(SystemClauseType::MakeDirectoryPath),
              ("$delete_file", 1) => Some(SystemClauseType::DeleteFile),
 +            ("$delete_directory", 1) => Some(SystemClauseType::DeleteDirectory),
              ("$working_directory", 2) => Some(SystemClauseType::WorkingDirectory),
              ("$path_canonical", 2) => Some(SystemClauseType::PathCanonical),
              ("$file_time", 3) => Some(SystemClauseType::FileTime),
index 35dacf09c4d2ec1d0d002ec05dd9797a38c2b283,812ab361186fb79f2bebe4816a4c031a7bd7aee9..1d9841c9daa6b2f5dd6545fe283046ef0ed7ca17
@@@ -51,8 -51,8 +51,9 @@@
                    file_exists/1,
                    directory_exists/1,
                    delete_file/1,
 +                                delete_directory/1,
                    make_directory/1,
+                   make_directory_path/1,
                    working_directory/2,
                    path_canonical/2,
                    path_segments/2,
Simple merge