blob: 3a9672d93c9b2f7dd458261375fb4876c017ffcb [file] [log] [blame]
package eu.mulk.jgvariant.ostree;
import eu.mulk.jgvariant.core.Decoder;
import java.nio.ByteOrder;
import java.util.List;
/**
* Permission bits and extended attributes for a directory.
*
* <p>Reference: {@code ostree-core.h#OSTREE_DIRMETA_GVARIANT_STRING}
*/
public record DirMeta(int uid, int gid, int mode, List<Xattr> xattrs) {
private static final Decoder<DirMeta> DECODER =
Decoder.ofStructure(
DirMeta.class,
Decoder.ofInt().withByteOrder(ByteOrder.BIG_ENDIAN),
Decoder.ofInt().withByteOrder(ByteOrder.BIG_ENDIAN),
Decoder.ofInt().withByteOrder(ByteOrder.BIG_ENDIAN),
Decoder.ofArray(Xattr.decoder()));
public static Decoder<DirMeta> decoder() {
return DECODER;
}
}