g4mba5 at gmail.com
Sun Jan 3 01:01:17 CET 2021
Le 03/01/2021 à 00:32, Fabien Bodard a écrit :
> A Base Class (Blocks) will allow to list the available Blocks
> (_Block), and rely them to their devices (_Drive).
> What did you think about that Way ?
I'd like to have:
1) A static class "Disks" that allows to enumerate "Disk" objects. These
"Disk" objects are the udisk2 "blocks".
2) The "Disk" object may give access to a "Drive" object that represents
the udisk2 "drive".
3) A dynamic class to watch the changes in the disks. Maybe the "Disks"
class can be used too: all "Disks" objects will internally share the
same static disk data. The "Disks" class will have the "CREATE STATIC"
flag so that it can be used statically (for enumerating) and dynamically
4) You must handle errors. When you mount or unmount disks for example.
And you have to return error messages if possible.
More information about the User