category
packs_common
ï
Common predicates for the packs tool objects.
logtalk_load(packs(loader))
static
Public predicatesï
setup/0
ï
Ensures that registries and packs directory structure exists. Preserves any defined registries and installed packs.
static
setup
- one
reset/0
ï
Resets registries and packs directory structure. Deletes any defined registries and installed packs.
static
reset
- one
verify_commands_availability/0
ï
Verifies required shell commands availability. Fails printing an error message if a command is missing.
static
verify_commands_availability
- zero_or_one
help/0
ï
Provides help about the main predicates.
static
help
- one
pin/1
ï
Pins a resource (pack or registry) preventing it from being updated, uninstalled, or deleted. Fails if the resource is not found.
static
pin(Resource)
pin(+atom)
- zero_or_one
Resource
is a variable:instantiation_error
Resource
is neither a variable nor an atom:type_error(atom,Resource)
pin/0
ï
Pins all resource (packs or registries) preventing them from being updated, uninstalled, or deleted. Note that resources added after calling this predicate will not be pinned.
static
pin
- one
unpin/1
ï
Unpins a resource (pack or registry), allowing it to be updated, uninstalled, or deleted. Fails if the resource is not found.
static
unpin(Resource)
unpin(+atom)
- zero_or_one
Resource
is a variable:instantiation_error
Resource
is neither a variable nor an atom:type_error(atom,Resource)
unpin/0
ï
Unpins all resources (packs or registries), allowing them to be updated, uninstalled, or deleted.
static
unpin
- one
pinned/1
ï
True iff the resource (pack or registry) is defined or installed and if it is pinned.
static
pinned(Resource)
pinned(+atom)
- zero_or_one
Resource
is a variable:instantiation_error
Resource
is neither a variable nor an atom:type_error(atom,Resource)
directory/2
ï
Enumerates by backtracking all packs or registries and respective installation or definition directories (using the internal backend format).
static
directory(Resource,Directory)
directory(?atom,?atom)
- zero_or_more
Resource
is neither a variable nor an atom:type_error(atom,Resource)
Directory
is neither a variable nor an atom:type_error(atom,Directory)
directory/1
ï
Prints the directory where the registry or the pack is installed (using the native operating-system format).
static
directory(Resource)
directory(+atom)
- zero_or_one
Resource
is a variable:instantiation_error
Resource
is neither a variable nor an atom:type_error(atom,Resource)
readme/2
ï
Returns the path to the resource (pack or registry) readme file (using the internal backend format). Fails if the resource is not defined or installed or if no readme file is found for it.
static
readme(Resource,ReadMeFile)
readme(+atom,-atom)
- zero_or_one
Resource
is a variable:instantiation_error
Resource
is neither a variable nor an atom:type_error(atom,Resource)
ReadMeFile
is neither a variable nor an atom:type_error(atom,ReadMeFile)
readme/1
ï
Prints the path to the resource (pack or registry) readme file (using the native operating-system format). Fails if the resource is not defined or installed or if no readme file is found for it.
static
readme(Resource)
readme(+atom)
- zero_or_one
Resource
is a variable:instantiation_error
Resource
is neither a variable nor an atom:type_error(atom,Resource)
logtalk_packs/1
ï
Returns the directory prefix (using the internal backend format) where the registries, packs, and archives are installed.
static
logtalk_packs(LogtalkPacks)
logtalk_packs(-atom)
- one
LogtalkPacks
is neither a variable nor an atom:type_error(atom,LogtalkPacks)
logtalk_packs/0
ï
Prints the directory prefix (using the native operating-system format) where the registries, packs, and archives are installed.
static
logtalk_packs
- one
prefix/1
ï
Returns the directory prefix (using the internal backend format) where the registries or packs are installed.
static
prefix(Prefix)
prefix(-atom)
- one
Prefix
is neither a variable nor an atom:type_error(atom,Prefix)
prefix/0
ï
Prints the directory prefix (using the native operating-system format) where the registries or packs are installed.
static
prefix
- one
Protected predicatesï
readme_file_path/2
ï
Returns the absolute path for the given directory readme file if it exists.
static
readme_file_path(Directory,ReadMeFile)
readme_file_path(+atom,-atom)
- zero_or_one
Valid file names: Case variations of
README
andNOTES
with or without a.md
or.txt
extension. The recommended file name isREADME.md
.
print_readme_file_path/1
ï
Prints the absolute path for the given directory readme file if it exists. Succeeds otherwise.
static
print_readme_file_path(Directory)
print_readme_file_path(+atom)
- one
command/2
ï
Executes a shell command. Prints an error message and fails if the command fails.
static
command(Command,FailureMessage)
command(+atom,@nonvar)
- zero_or_one
load_registry/1
ï
Loads all registry files from the given directory.
static
load_registry(Directory)
load_registry(+atom)
- zero_or_one
tar_command/1
ï
Returns the name of the tar command to be used depending on the operating-system.
static
tar_command(Command)
tar_command(-atom)
- one
supported_archive/1
ï
True iff the archive format is supported.
static
supported_archive(Extension)
supported_archive(+atom)
- zero_or_one
supported_url_archive/1
ï
True iff the URL archive is supported.
static
supported_url_archive(URL)
supported_url_archive(+atom)
- zero_or_one
decode_url_spaces/2
ï
Decodes encoded spaces (%20) in URLs to spaces.
static
decode_url_spaces(URL,Decoded)
decode_url_spaces(+atom,-atom)
- one
Private predicatesï
(no local declarations; see entity ancestors if any)
Operatorsï
(none)