category
packs_common
Common predicates for the packs tool objects.
logtalk_load(packs(loader))staticPublic predicates
setup/0
Ensures that registries and packs directory structure exists. Preserves any defined registries and installed packs.
staticsetup - onereset/0
Resets registries and packs directory structure. Deletes any defined registries and installed packs.
staticreset - oneverify_commands_availability/0
Verifies required shell commands availability. Fails printing an error message if a command is missing.
staticverify_commands_availability - zero_or_onehelp/0
Provides help about the main predicates.
statichelp - onepin/1
Pins a resource (pack or registry) preventing it from being updated, uninstalled, or deleted. Fails if the resource is not found.
staticpin(Resource)pin(+atom) - zero_or_oneResource is a variable:instantiation_errorResource 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.
staticpin - oneunpin/1
Unpins a resource (pack or registry), allowing it to be updated, uninstalled, or deleted. Fails if the resource is not found.
staticunpin(Resource)unpin(+atom) - zero_or_oneResource is a variable:instantiation_errorResource 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.
staticunpin - onepinned/1
True iff the resource (pack or registry) is defined or installed and if it is pinned.
staticpinned(Resource)pinned(+atom) - zero_or_oneResource is a variable:instantiation_errorResource 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).
staticdirectory(Resource,Directory)directory(?atom,?atom) - zero_or_moreResource 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).
staticdirectory(Resource)directory(+atom) - zero_or_oneResource is a variable:instantiation_errorResource 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.
staticreadme(Resource,ReadMeFile)readme(+atom,-atom) - zero_or_oneResource is a variable:instantiation_errorResource 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.
staticreadme(Resource)readme(+atom) - zero_or_oneResource is a variable:instantiation_errorResource 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.
staticlogtalk_packs(LogtalkPacks)logtalk_packs(-atom) - oneLogtalkPacks 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.
staticlogtalk_packs - oneprefix/1
Returns the directory prefix (using the internal backend format) where the registries or packs are installed.
staticprefix(Prefix)prefix(-atom) - onePrefix 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.
staticprefix - oneProtected predicates
readme_file_path/2
Returns the absolute path for the given directory readme file if it exists.
staticreadme_file_path(Directory,ReadMeFile)readme_file_path(+atom,-atom) - zero_or_one
Valid file names: Case variations of
READMEandNOTESwith or without a.mdor.txtextension. 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.
staticprint_readme_file_path(Directory)print_readme_file_path(+atom) - onecommand/2
Executes a shell command. Prints an error message and fails if the command fails.
staticcommand(Command,FailureMessage)command(+atom,@nonvar) - zero_or_oneload_registry/1
Loads all registry files from the given directory.
staticload_registry(Directory)load_registry(+atom) - zero_or_onesha256sum_command/1
Returns the name of the sha256sum command to be used on POSIX systems. Fails if neither gsha256sum or sha256sum commands are found.
staticsha256sum_command(Command)sha256sum_command(-atom) - zero_or_onetar_command/1
Returns the name of the tar command to be used depending on the operating-system.
statictar_command(Command)tar_command(-atom) - onesupported_archive/1
True iff the archive format is supported.
staticsupported_archive(Extension)supported_archive(+atom) - zero_or_onesupported_url_archive/1
True iff the URL archive is supported.
staticsupported_url_archive(URL)supported_url_archive(+atom) - zero_or_onedecode_url_spaces/2
Decodes encoded spaces (%20) in URLs to spaces.
staticdecode_url_spaces(URL,Decoded)decode_url_spaces(+atom,-atom) - onePrivate predicates
(no local declarations; see entity ancestors if any)
Operators
(none)