VulnCheck.Workspace.AppFile (VulnCheck v1.0.1)

Copy Markdown View Source

Reader for OTP application resource files (ebin/<app>.app and src/<app>.app.src) built on the atom-safe VulnCheck.ErlTerm parser.

Summary

Functions

Finds and reads the single .app file of an ebin directory.

Reads and parses an application resource file.

Reads <ebin_dir>/<app>.app, returning nil when it does not exist or is unreadable.

Types

t()

@type t() :: %VulnCheck.Workspace.AppFile{
  applications: [String.t()],
  included_applications: [String.t()],
  mod: String.t() | nil,
  modules: [String.t()],
  name: String.t(),
  optional_applications: [String.t()],
  registered: [String.t()],
  vsn: String.t() | nil
}

Functions

find_in_ebin(ebin_dir)

@spec find_in_ebin(String.t() | nil) :: t() | nil

Finds and reads the single .app file of an ebin directory.

read(path)

@spec read(Path.t()) :: {:ok, t()} | {:error, String.t()}

Reads and parses an application resource file.

read_ebin(ebin_dir, app)

@spec read_ebin(String.t() | nil, String.t()) :: t() | nil

Reads <ebin_dir>/<app>.app, returning nil when it does not exist or is unreadable.