Module packbeam

An escript and OTP 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

An escript and OTP 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.
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.

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(), Names::[path()]) -> ok | {error, Reason::term()}

OutputPath: the path to write the AVM file
InputPath: the AVM file from which to delete elements
Names: a list of elements from the source AVM file to delete

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