Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
pub
frama-c
Commits
9e2f1e93
Commit
9e2f1e93
authored
1 year ago
by
Andre Maroneze
Browse files
Options
Downloads
Patches
Plain Diff
[Filepath] add Normalized.concats
parent
7979b5b9
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
src/libraries/utils/filepath.ml
+3
-0
3 additions, 0 deletions
src/libraries/utils/filepath.ml
src/libraries/utils/filepath.mli
+8
-0
8 additions, 0 deletions
src/libraries/utils/filepath.mli
with
11 additions
and
0 deletions
src/libraries/utils/filepath.ml
+
3
−
0
View file @
9e2f1e93
...
@@ -278,6 +278,9 @@ module Normalized = struct
...
@@ -278,6 +278,9 @@ module Normalized = struct
let
of_string
?
existence
?
base_name
s
=
normalize
?
existence
?
base_name
s
let
of_string
?
existence
?
base_name
s
=
normalize
?
existence
?
base_name
s
let
concat
?
existence
t
s
=
normalize
?
existence
(
t
^
"/"
^
s
)
let
concat
?
existence
t
s
=
normalize
?
existence
(
t
^
"/"
^
s
)
let
concats
?
existence
t
sl
=
let
s'
=
List
.
fold_left
(
fun
acc
s
->
acc
^
"/"
^
s
)
""
sl
in
normalize
?
existence
(
t
^
s'
)
let
to_pretty_string
s
=
pretty
s
let
to_pretty_string
s
=
pretty
s
let
to_string_list
l
=
l
let
to_string_list
l
=
l
let
equal
:
t
->
t
->
bool
=
(
=
)
let
equal
:
t
->
t
->
bool
=
(
=
)
...
...
This diff is collapsed.
Click to expand it.
src/libraries/utils/filepath.mli
+
8
−
0
View file @
9e2f1e93
...
@@ -82,6 +82,14 @@ module Normalized: sig
...
@@ -82,6 +82,14 @@ module Normalized: sig
*)
*)
val
concat
:
?
existence
:
existence
->
t
->
string
->
t
val
concat
:
?
existence
:
existence
->
t
->
string
->
t
(**
[concats ~existence dir paths] concatenates a list of paths, as per
the [concat] function.
@since Frama-C+dev
*)
val
concats
:
?
existence
:
existence
->
t
->
string
list
->
t
(** [to_pretty_string p] returns [p] prettified,
(** [to_pretty_string p] returns [p] prettified,
that is, a relative path-like string.
that is, a relative path-like string.
Note that this prettified string may contain symbolic dirs and is thus
Note that this prettified string may contain symbolic dirs and is thus
...
...
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