Did you know ... Search Documentation:
Pack prolog_library_collection -- prolog/uri_ext.pl
PublicShow source

Extends the support for URIs in the SWI-Prolog standard library.

 append_segments(+Segments1:list(atom), +Segments2:list(atom), +Segments3:list(atom)) is semidet
append_segments(+Segments1:list(atom), +Segments2:list(atom), -Segments3:list(atom)) is det
Appends lists of path segments. Empty segments commonly appear at the beginning and end of URI paths.
 uri_comp_get(+Kind:oneof([authority,fragment,host,password,path,port,query,scheme,user]), +Uri:uri, +Component:term) is semidet
uri_comp_get(+Kind:oneof([authority,fragment,host,password,path,port,query,scheme,user]), +Uri:uri, -Component:term) is det
 uri_comp_set(+Kind:oneof([fragment,query]), +Uri1, +Component, -Uri2) is det
Change a specific URI component.
 uri_comps(+Uri, -Components) is det
uri_comps(-Uri, +Components) is det
Components is a compound term of the form `uri(Scheme,Authority,Segments,Query,Fragment)', where:
  • Authority is either an atom or a compound term of the form `auth(User,Password,Host,Port)'.
  • Segments is a list of atomic path segments.
  • Query is (1) a list of unary compound terms, or (2) a list of pairs, or (3) a flat dict (i.e., a dict with non-dict values).
 uri_data_directory(+Uri:atom, -Directory:atom) is det
 uri_data_file(+Uri:atom, +Local:atom, -File:atom) is det
 uri_file_extensions(+Uri:atom, -Extensions:list(atom)) is det
 uri_file_is_fresh(+Uri:uri, +File:atom) is det
 uri_local_name(+Uri:atom, -Local:atom) is det
 uri_media_type(+Uri:atom, -MediaType:media_type) is det
 uri_relative_path(+Uri:atom, +Local:atom, -RelativePath:atom) is det
 uri_scheme(+Uri:atom, +Scheme:atom) is semidet
uri_scheme(+Uri:atom, -Scheme:atom) is semidet
 uri_strip(+Uri1:atom, -Uri2:atom) is det
Uri2 is like Uri1, but without the query and fragment components.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 uri_components(Arg1, Arg2)
 uri_data(Arg1, Arg2, Arg3)
 uri_data(Arg1, Arg2, Arg3, Arg4)
 uri_edit(Arg1, Arg2, Arg3)
 uri_normalized(Arg1, Arg2)
 iri_normalized(Arg1, Arg2)
 uri_normalized_iri(Arg1, Arg2)
 uri_normalized(Arg1, Arg2, Arg3)
 iri_normalized(Arg1, Arg2, Arg3)
 uri_normalized_iri(Arg1, Arg2, Arg3)
 uri_resolve(Arg1, Arg2, Arg3)
 uri_is_global(Arg1)
 uri_query_components(Arg1, Arg2)
 uri_authority_components(Arg1, Arg2)
 uri_authority_data(Arg1, Arg2, Arg3)
 uri_encoded(Arg1, Arg2, Arg3)
 uri_file_name(Arg1, Arg2)
 uri_iri(Arg1, Arg2)