Module packbeam_api

A library used to generate an AtomVM AVM file from a set of files (beam files, previously built AVM files, or even arbitrary data files).

Description

A library used to generate an AtomVM AVM file from a set of files (beam files, previously built AVM files, or even arbitrary data files).

Data Types

parsed_file()

parsed_file() = [{string(), term()}]

path()

path() = string()

Function Index

create/2 Create an AVM file.
create/4 Create an AVM file.
create/5 Create an AVM file.
delete/3 Delete selected elements of an AVM file.
list/1 List the contents of an AVM file.

Function Details

create/2

create(OutputPath::path(), InputPaths::[path()]) -> ok | {error, Reason::term()}

OutputPath: the path to write the AVM file
InputPaths: a list of paths of beam files, AVM files, or normal data files

returns: ok if the file was created.

throws string()

Create an AVM file.

Equivalent to create(OutputPath, InputPaths, false).

create/4

create(OutputPath::path(), InputPaths::[path()], Prune::boolean(), StartModule::module() | undefined) -> ok | {error, Reason::term()}

OutputPath: the path to write the AVM file
InputPaths: a list of paths of beam files, AVM files, or normal data files
Prune: whether to prune the archive. Without pruning, all found BEAM files are included in the output AVM file. With pruning, then packbeam will attempt to determine which BEAM files are needed to run the application, depending on which modules are (transitively) referenced from the AVM entrypoint.
StartModule: if undefined, then this parameter is a module that is intended to the the start module for the application. This module will occur first in the generated AVM file.

returns: ok if the file was created.

throws string()

Create an AVM file.

Equivalent to create(OutputPath, InputPaths, undefined, Prune, StartModule).

create/5

create(OutputPath::path(), InputPaths::[path()], ApplicationModule::module() | undefined, Prune::boolean(), StartModule::module() | undefined) -> ok | {error, Reason::term()}

OutputPath: the path to write the AVM file
InputPaths: a list of paths of beam files, AVM files, or normal data files
ApplicationModule: If not undefined, then this parameter designates the name of an OTP application, from which additional dependencies will be computed.
Prune: whether to prune the archive. Without pruning, all found BEAM files are included in the output AVM file. With pruning, then packbeam will attempt to determine which BEAM files are needed to run the application, depending on which modules are (transitively) referenced from the AVM entrypoint.
StartModule: if undefined, then this parameter is a module that is intended to the the start module for the application. This module will occur first in the generated AVM file.

returns: ok if the file was created.

throws string()

Create an AVM file.

This function will create an AVM file at the location specified in OutputPath, using the input files specified in InputPaths.

delete/3

delete(OutputPath::path(), InputPath::path(), Name::[path()]) -> ok | {error, Reason::term()}

OutputPath: the path to write the AVM file
InputPath: the AVM file from which to delete elements

returns: ok if the file was created.

throws string()

Delete selected elements of an AVM file.

This function will delete elements of an AVM file at the location specified in InputPath, specified by the supplied list of names. The output AVM file is written to OutputPath, which may be the same as InputPath.

list/1

list(InputPath::path()) -> [parsed_file()]

InputPath: the AVM file from which to list elements

returns: list of parsed file data

throws string()

List the contents of an AVM file.

This function will list the contents of an AVM file at the location specified in InputPath.


Generated by EDoc