disk_partitions(): add disk type info (ssd / rotational)
Summary
- OS: all
- Type: new-api
Description
An extra "disktype" field could be added to the retuned namedtuple indicating whether the partition refers to an SSD or a rotational disk drive.
The value should be a string like "ssd", "rotational" or "" / None (undefined).
This new value could be particularly useful to identify (and filter for) real disks/partitions, because the result returned by disk_partitions() is unclear on what's "real" and what's "virtual".
Here's another use case: https://stackoverflow.com/questions/30647758/in-python-can-i-see-if-a-file-lives-on-an-hd-or-an-ssd)
Also, https://github.com/giampaolo/psutil/issues/1681 / https://github.com/giampaolo/psutil/pull/1694 must be taken into account. Should psutil.disk_swaps() also return this new field?