mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
New API: feature-available.
This API is an easier to use version of the existing guestfs_available, because the new API returns true/false instead of throwing an error when a feature from the list is not available. In truth we've had this implementation internally in the library and several tools and in Sys::Guestfs::Lib for a long time. This change just turns it into a publicly consumable API.
This commit is contained in:
@@ -1037,15 +1037,10 @@ containing useful introspection information about the method
|
||||
}
|
||||
|
||||
To test if particular features are supported by the current
|
||||
build, use the L</available> method like the example below. Note
|
||||
build, use the L</feature_available> method like the example below. Note
|
||||
that the appliance must be launched first.
|
||||
|
||||
$g->available ( [\"augeas\"] );
|
||||
|
||||
Since the L</available> method croaks if the feature is not supported,
|
||||
you might also want to wrap this in an eval and return a boolean.
|
||||
In fact this has already been done for you: use
|
||||
L<Sys::Guestfs::Lib(3)/feature_available>.
|
||||
$g->feature_available ( [\"augeas\"] );
|
||||
|
||||
For further discussion on this topic, refer to
|
||||
L<guestfs(3)/AVAILABILITY>.
|
||||
|
||||
Reference in New Issue
Block a user