Skip to content

Gio.FileAttributeInfoList

record (struct)

Acts as a lightweight registry for possible valid file attributes. The registry stores Key-Value pair formats as GFileAttributeInfos.

Constructors

new

@classmethod
def new(cls) -> FileAttributeInfoList

Creates a new file attribute info list.

Methods

add

def add(self, name: str, type: FileAttributeType | int, flags: FileAttributeInfoFlags | int) -> None

Adds a new attribute with name to the list, setting its type and flags.

Parameters:

dup

def dup(self) -> FileAttributeInfoList

Makes a duplicate of a file attribute info list.

lookup

def lookup(self, name: str) -> FileAttributeInfo

Gets the file attribute with the name name from list.

Parameters:

  • name — the name of the attribute to look up.

ref

def ref(self) -> FileAttributeInfoList

References a file attribute info list.

unref

def unref(self) -> None

Removes a reference from the given list. If the reference count falls to zero, the list is deleted.

Properties

infos

infos: FileAttributeInfo  # read/write

n_infos

n_infos: int  # read/write