Horizon::DiskMan::Disk::partitions(3)

NAME
Horizon::DiskMan::Disk::partitions, Horizon::DiskMan::Disk::reload_partitions - retrieve partitioning information for a disk

SYNOPSIS
#include <diskman/disk.hh>
using Horizon::DiskMan::Disk; using Horizon::DiskMan::Partition;
const std::vector<Partition>
Disk::partitions();
bool
Disk::reload_partitions();

DESCRIPTION
The Disk::partitions() function returns a vector containing the partitions present in the disk's label. Calling this function is only valid if Horizon::DiskMan::Disk::has_label(3) returns true.

The Disk::reload_partitions() function will re-read the disk's label, returning true if the label was read successfully.

RETURN VALUES
The Disk::partitions() function returns a std::vector(3) containing Horizon::DiskMan::Partition(3) objects corresponding to the partitions in the disk's label. If the disk's label is empty, the vector will be empty.

The Disk::reload_partitions() function returns true if the disk label was successfully read and parsed. If the disk label could not be read or parsed, Disk::reload_partitions() will return false and the current partition list (if any) is retained.

SEE ALSO
Horizon::DiskMan::Disk::has_label(3), Horizon::DiskMan::Disk(3), Horizon::DiskMan::DiskMan(3), Horizon::DiskMan::Partition(3).

HISTORY
The DiskMan library first appeared in Horizon 0.9.

AUTHORS
A. Wilcox <awilfox@adelielinux.org>