summaryrefslogtreecommitdiff
path: root/diskman/man/Horizon::DiskMan::Disk::partitions.3
blob: 2cb787eb97c87e9a1af05259c49221f29f10fa81 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
.Dd May 15, 2020
.Dt Horizon::DiskMan::Disk::partitions 3
.Os "Adélie Linux"
.Sh NAME
.Nm Horizon::DiskMan::Disk::partitions ,
.Nm Horizon::DiskMan::Disk::reload_partitions
.Nd retrieve partitioning information for a disk
.Sh SYNOPSIS
.In diskman/disk.hh
.Cm using Horizon::DiskMan::Disk;
.Cm using Horizon::DiskMan::Partition;
.Ft const std::vector<Partition>
.Fo Disk::partitions
.Fc
.Ft bool
.Fo Disk::reload_partitions
.Fc
.Sh DESCRIPTION
The
.Fn Disk::partitions
function returns a vector containing the partitions present in the disk's
label.  Calling this function is only valid if
.Xr Horizon::DiskMan::Disk::has_label 3
returns true.
.Pp
The
.Fn Disk::reload_partitions
function will re-read the disk's label, returning true if the label was read
successfully.
.Sh RETURN VALUES
The
.Fn Disk::partitions
function returns a
.Xr std::vector 3
containing
.Xr 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.
.Pp
The
.Fn 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,
.Fn Disk::reload_partitions
will return false and the current partition list (if any) is retained.
.Sh SEE ALSO
.Xr Horizon::DiskMan::Disk::has_label 3 ,
.Xr Horizon::DiskMan::Disk 3 ,
.Xr Horizon::DiskMan::DiskMan 3 ,
.Xr Horizon::DiskMan::Partition 3 .
.Sh HISTORY
The DiskMan library first appeared in Horizon 0.9.
.Sh AUTHORS
.An A. Wilcox
.Aq awilfox@adelielinux.org