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
{v require (file_exists "somefile");}
will die unless ["somefile"] exists. *)
+val directory_exists : string -> bool
+ (** Return true if the named directory exists.
+
+ There is also a goal version of this function. *)
+
val file_newer_than : string -> string -> bool
(** [file_newer_than file_a file_b] returns true if [file_a] is
newer than [file_b]. Note that if [file_a] does not exist, it
* if the predicate returns false.
*)
val goal_file_exists : string -> unit
+val goal_directory_exists : string -> unit
val goal_file_newer_than : string -> string -> unit
val goal_more_recent : string list -> string list -> unit
val goal_url_exists : string -> unit