Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cogsys
Dare2Del
Demonstrator - Reasoning WebAPI
Commits
a17089b9
Commit
a17089b9
authored
Jun 14, 2021
by
Siebers, Michael
Browse files
introduce aux predicate for absolute path type
parent
57098570
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/web_api/background.pl
View file @
a17089b9
...
...
@@ -71,8 +71,9 @@ all_items_external_(_Key-Value,Item) :-
%
% Generates the type definition for an item (that is a file or a directory). Type is a valid type as defined by types:check_type_def/1.
item_type
(
anyof
([
DirectoryType
,
FileType
]))
:-
abs_path_type
(
AbsPathType
),
CommonKeys
=
[
abs_path
:
atom
(
'^(/|.*[^/])$'
)
,
abs_path
:
AbsPathType
,
creation_time
:
integer
],
FileType
=
dict
([
...
...
src/web_api/irrelevance.pl
View file @
a17089b9
...
...
@@ -18,8 +18,9 @@
% @error api_error(_, implementation_error) if checking the irrelevance itself
% throws an exception.
do_handle_irrelevant_file
(
Parameters
,
AbsPath
)
:-
abs_path_type
(
AbsPathType
),
parse_parameters
(
Parameters
,
dict
([
abs_path
:
atom
]),
dict
([
abs_path
:
AbsPathType
]),
Parsed
),
AbsPath
=
Parsed
.
abs_path
,
catch
(
user
:
irrelevant
(
AbsPath
),
...
...
src/web_api/requests.pl
View file @
a17089b9
...
...
@@ -99,3 +99,8 @@ parse_parameters(In, Type, Out) :-
throw
(
Exception
)
)
).
%! abs_path_type(-Type) is det.
%
% Return the type definition for an absolute path used to identify items.
abs_path_type
(
atom
(
'^(/|.*[^/])$'
)).
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment