View Source packbeam_api (atomvm_packbeam v0.7.2)
Summary
Functions
Create an AVM file.
Create an AVM file.
Delete selected elements of an AVM file.
Extract all or selected elements from an AVM file.
Return AVM element data.
Return AVM element module, if the element is a BEAM file.
Return the name of the element.
Indicates whether the AVM file element is a BEAM file.
Indicates whether the AVM file element is an entrypoint.
List the contents of an AVM file.
Types
-opaque avm_element()
-type avm_element_name() :: string().
-type options() ::
#{prune => boolean(),
start_module => module() | undefined,
application_module => module() | undefined,
include_lines => boolean()}.
-type path() :: string().
Functions
Create an AVM file.
Equivalent to create(OutputPath, InputPaths, DefaultOptions)
DefaultOptions
is #{ prune => false, start_module => undefined, application_module => undefined, include_lines => false }
-spec create(OutputPath :: path(), InputPaths :: [path()], Options :: options()) -> ok | {error, Reason :: term()}.
Create an AVM file.
This function will create an AVM file at the location specified in OutputPath, using the input files specified in InputPaths.
This function is deprecated. This function is deprecated. Use create/3 instead..
Link to this function
create(OutputPath, InputPaths, ApplicationModule, Prune, StartModule)
View Source
This function is deprecated. This function is deprecated. Use create/3 instead..
-spec delete(OutputPath :: path(), InputPath :: path(), AVMElementNames :: [avm_element_name()]) -> ok | {error, Reason :: term()}.
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.-spec extract(InputPath :: path(), AVMElementNames :: [avm_element_name()], OutputDir :: path()) -> ok | {error, Reason :: term()}.
Extract all or selected elements from an AVM file.
This function will extract elements of an AVM file at the location specified in InputPath, specified by the supplied list of names. The elements from the input AVM file will be written into the specified output directory, creating any subdirectories if the AVM file elements contain path information.-spec get_element_data(AVMElement :: avm_element()) -> binary().
-spec get_element_module(AVMElement :: avm_element()) -> module() | undefined.
-spec get_element_name(AVMElement :: avm_element()) -> avm_element_name().
-spec is_beam(AVMElement :: avm_element()) -> boolean().
-spec is_entrypoint(AVMElement :: avm_element()) -> boolean().
-spec list(InputPath :: path()) -> [avm_element()].
List the contents of an AVM file.
This function will list the contents of an AVM file at the location specified in InputPath.