is_blockdev


Description:

[ Version ( since = "1.5.10" ) ]
public int8 is_blockdev (string path, IsBlockdev? optargs) throws Error

test if block device

This returns true if and only if there is a block device with the given path name.

If the optional flag followsymlinks is true, then a symlink (or chain of symlinks) that ends with a block device also causes the function to return true.

This call only looks at files within the guest filesystem. Libguestfs partitions and block devices (eg. /dev/sda) cannot be used as the path parameter of this call.

See also stat.

Parameters:

this

A GuestfsSession object

optargs

a GuestfsIsBlockdev containing optional arguments

Returns:

the returned value, or -1 on error