25prolog
:file_name_on_path(
Path,
ShortId)
:-
26 ( prolog
:file_alias_path(
Alias,
Dir),
27 atom_concat(
Dir,
Local,
Path)
31 -> ShortId =.. [
Alias,
Base]
32 ; ShortId =.. [
Alias,
Local]
41prolog
:file_alias_path(
Alias,
Dir)
:-
47 -> ensure_slash(
Dir,
DirSlash),
48 alias_cache(
Alias,
DirSlash)
49 ; alias_cache(
Alias,
Dir)
53 findall(t(
DirLen,
AliasLen,
Alias,
Dir),
54 search_path(
Alias,
Dir,
AliasLen,
DirLen),
Ts),
57 forall(lists
:member(t(
_,
_,
Alias,
Dir),
List),
58 assert(alias_cache(
Alias,
Dir))).
60search_path(
'.',
Here,
999,
DirLen)
:-
62 ensure_slash(
Here0,
Here),
64search_path(
Alias,
Dir,
AliasLen,
DirLen)
:-
66 Alias \== file_search_path,
69 AliasLen is 1000 - AliasLen0,
71 [ file_type(directory),
76 ensure_slash(
Dir0,
Dir),
79ensure_slash(
Dir,
Dir)
:-
81ensure_slash(
Dir0,
Dir)
:-
94 reverse(
List, [],
Reversed).
96reverse([],
Reversed,
Reversed).
97reverse([
Head|Tail],
Sofar,
Reversed)
:-
98 reverse(
Tail, [
Head|Sofar],
Reversed).
106:- if(current_prolog_flag(windows, true)).
107if
:win_add_dll_directory(
Dir)
:-
108 win_add_dll_directory(
Dir,
_),
win_add_dll_directory.
109win_add_dll_directory
:win_add_dll_directory(
Dir)
:-
111 getenv(
'PATH',
Path0),
absolute_file_name( -File:atom, +Path:atom, +Options:list)
atomic_list_concat(? As,+ Separator,? A)
file_name_extension( ? BaseFile, ?Extension, ?FullNameO)
reverse(+ List, ? Reversed)
working_directory( ?_CurDir_,? NextDir)
sub_atom(+ A,? Bef, ? Size, ? After, ? At_out)
prolog_to_os_filename(+ PrologPath,- OsPath)
file_search_path(+Name:atom, -Directory:atom)