Implement 'directory_exists' function.
[goaljobs.git] / goaljobs.ml
index bb7141a..6875ca5 100644 (file)
@@ -391,6 +391,11 @@ let goal_file_exists filename =
     let msg = sprintf "file '%s' required but not found" filename in
     goal_failed msg
   )
+let goal_directory_exists path =
+  if not (directory_exists path) then (
+    let msg = sprintf "directory '%s' required but not found" path in
+    goal_failed msg
+  )
 let goal_file_newer_than f1 f2 =
   if not (file_newer_than f1 f2) then (
     let msg = sprintf "file %s is required to be newer than %s" f1 f2 in