Wick.Protocol.Attr (wick v0.1.0)

Copy Markdown View Source

fuse_attr — the 88-byte embedded POSIX-attribute struct used inside fuse_entry_out, fuse_attr_out, and a few notification payloads.

Field order matches include/uapi/linux/fuse.h v7.31. padding is written as zero.

Summary

Functions

Decode an fuse_attr from the leading 88 bytes of a binary. Returns the struct and the remaining bytes.

Encode fuse_attr to 88 little-endian bytes.

Wire size in bytes (always 88).

Types

t()

@type t() :: %Wick.Protocol.Attr{
  atime: non_neg_integer(),
  atimensec: non_neg_integer(),
  blksize: non_neg_integer(),
  blocks: non_neg_integer(),
  ctime: non_neg_integer(),
  ctimensec: non_neg_integer(),
  gid: non_neg_integer(),
  ino: non_neg_integer(),
  mode: non_neg_integer(),
  mtime: non_neg_integer(),
  mtimensec: non_neg_integer(),
  nlink: non_neg_integer(),
  rdev: non_neg_integer(),
  size: non_neg_integer(),
  uid: non_neg_integer()
}

Functions

decode(arg1)

@spec decode(binary()) :: {:ok, t(), binary()} | {:error, :malformed_body}

Decode an fuse_attr from the leading 88 bytes of a binary. Returns the struct and the remaining bytes.

encode(a)

@spec encode(t()) :: binary()

Encode fuse_attr to 88 little-endian bytes.

size()

@spec size() :: 88

Wire size in bytes (always 88).