(* Guestfs Browser. * Copyright (C) 2010 Red Hat Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) (** Set of devices. This is essentially the same as a set of strings (see OCaml {!Set} module), but we relax comparisons so that devices with the same canonical name are the same. For example "/dev/sda5" is considered the same as "/dev/vda5". *) module DeviceSet : sig type t (** The type of the set. *) type elt = String.t (** The type of each element of the set. *) val subtract : t -> t -> t (** Set difference. [subtract a b] is like a subtraction operation, returning a new set which is constructed by removing all elements of [b] from [a]. (Note that this is the same operation as {!Set.diff}). *) val iter : (elt -> unit) -> t -> unit (** [iter f set] iterates over the set in increasing order. *) val of_list : elt list -> t (** Construct a new set from the list of elements. *) val of_array : elt array -> t (** Construct a new set from the array of elements. *) val to_string : t -> string (** Make the set into a printable string (just for debugging). *) end