Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
goaljobs
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenSource
goaljobs
Commits
12f3afe1
Commit
12f3afe1
authored
11 years ago
by
Richard W.M. Jones
Browse files
Options
Downloads
Patches
Plain Diff
Implement 'directory_exists' function.
parent
a613a9cb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
goaljobs.ml
+5
-0
5 additions, 0 deletions
goaljobs.ml
goaljobs.mli
+6
-0
6 additions, 0 deletions
goaljobs.mli
with
11 additions
and
0 deletions
goaljobs.ml
+
5
−
0
View file @
12f3afe1
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
goaljobs.mli
+
6
−
0
View file @
12f3afe1
...
...
@@ -200,6 +200,11 @@ val file_exists : string -> bool
{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
...
...
@@ -451,6 +456,7 @@ val publish : string -> (string list -> unit) -> unit
* 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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment