<--- Cannot embed stylesheet: [Errno 2] No such file or directory: '../../../../aros.css' --->

Volumelist.mui

MUIC_Volumelist

Superclass

List.mui

Description

Populate a list with devices, volumes and assigns from the DOS list at
construction. This class has no additional public attributes or methods.
Entries are appended in three passes: devices, volumes, then assigns, in
their DOS-list traversal order. No sorting, periodic refresh or
disk-change handler is installed.
The default format has five columns: icon, name, percentage used, free
space and used space, with numeric columns right-aligned. A non-NULL
caller List_Format suppresses this default. Construction installs its
own construction, destruction and display hooks after superclass
creation. Preserve those hooks for the class's private entry records;
entries are not ordinary strings.

Methods

Construction locks the DOS list for reading devices, volumes and
assigns. For each volume it additionally locks its colon-suffixed name,
requests Info, and releases that volume lock. It releases the DOS-list
lock after all passes. These synchronous DOS operations can block; no
timeout or cancellation is implemented. It returns the superclass object
even if individual row insertions fail, because insertion results are
ignored.
Device and assign rows leave usage fields empty. Volume rows also leave
them empty when Lock or Info fails. Successful Info supplies percentage
and byte counts. Percentage calculation does not guard a zero block
count or widen its multiplication before division; inconsistent or large
filesystem statistics can produce invalid arithmetic. Byte products use
UQUAD, but inconsistent used/total values can underflow the free-space
subtraction.

Notes

Names are stored in a 100-byte inline buffer: at most 98 copied name
bytes followed by a colon and terminator. The truncated name is also
used for volume Lock. Size strings use integer truncation: B through
9999 bytes, K above 9999 using a ten-bit shift, M from 9999999 using a
twenty-bit shift, and G from 9999999999 using a thirty-bit shift. The
final numeric value is cast to unsigned int; exceptionally large values
can truncate again.
Each inserted private record is copied into List's pool and released
there by the destruction hook. Display returns pointers into that
record, static icon strings or localized heading strings; it transfers
no ownership. The class does not retain DOS-list entries or volume locks
after construction. Inherited List operations remain available, but no
class-specific refresh operation repopulates the snapshot.