Packmatic.Manifest.Entry.Attributes (Packmatic v2.0.0)

View Source

The Manifest Entry Attributes represents the file’s UNIX and DOS attributes, such as UID, GID, sticky bit, UNIX permissions (0o777 aka rwxrwxrwx, etc), in a way that is easy to specify.

Terminology used in this module is inherited from the Linux <sys/stat.h> header and the capability of the module is designed to match what Erlang/OTP has in the :file module.

Summary

Types

Represents the representation of the Attributes within the Manifest Entry, which can either be the mode/0 itself (as a shorthand) or a property list proplist/0 that can be used to specify the file’s mode, any special bits, and the UID/GID of the file to be set upon decompression.

The short-hand UNIX mode of the entry; for example, 0o777 = rwxrwxrwx. See :file.change_mode/2 for further information.

t()

Types

entry()

@type entry() :: mode() | proplist()

Represents the representation of the Attributes within the Manifest Entry, which can either be the mode/0 itself (as a shorthand) or a property list proplist/0 that can be used to specify the file’s mode, any special bits, and the UID/GID of the file to be set upon decompression.

gid()

@type gid() :: non_neg_integer()

mode()

@type mode() :: 0..511

The short-hand UNIX mode of the entry; for example, 0o777 = rwxrwxrwx. See :file.change_mode/2 for further information.

proplist()

@type proplist() :: [
  mode() | {:uid, uid()} | {:gid, gid()} | :setuid | :setgid | :sticky,
  ...
]

t()

@type t() :: %Packmatic.Manifest.Entry.Attributes{
  gid: nil | gid(),
  mode: nil | mode(),
  setgid: boolean(),
  setuid: boolean(),
  sticky: boolean(),
  uid: nil | uid()
}

uid()

@type uid() :: non_neg_integer()

Functions

build(mode)

validate(entry)