Metadata about a file or directory.
A field is nil when the storage doesn't know it. Object stores have no directories to stat, and the local filesystem
stores no content type.
:size: size in bytes (nilfor directories on object stores):type::regularor:directory:mtime: last modification time as aDateTimein UTC:etag: an opaque version tag.Fil.Adapter.Localderives a weak one ("size-mtime"); S3 returns the object's ETag:content_type: the stored MIME type, when the storage keeps one:checksum:{algorithm, checksum}, with the checksum base64 encoded the way S3 encodes it. Only filled in whenFil.stat/3is called with the:checksumoption
Summary
Types
@type t() :: %Fil.Stat{ checksum: {:sha256 | :sha1 | :crc32, String.t()} | nil, content_type: String.t() | nil, etag: String.t() | nil, mtime: DateTime.t() | nil, size: non_neg_integer() | nil, type: type() | nil }
@type type() :: :regular | :directory