func (v VolumePathHandler) IsDeviceBindMountExist(mapPath string) (bool, error) {
	fi, err := os.Lstat(mapPath)
	if err != nil {
		// If file doesn't exist, return false and no error
		if os.IsNotExist(err) {
			return false, nil
		}

		// Return error from Lstat()
		return false, fmt.Errorf("failed to Lstat file %s: %v", mapPath, err)
	}
	// If file exits and it's device, return true and no error
	if fi.Mode()&os.ModeDevice == os.ModeDevice {
		return true, nil
	}
	// If file exits but it's not device, return false and no error
	return false, nil
}
// IsDeviceBindMountExist returns true if specified file exists and the type is device.
// If file doesn't exist, or file exists but not device, return false with no error.
// On other cases, return false with error from Lstat().
IsDeviceBindMountExist returns true if specified file exists and the type is device.
If file doesn't exist, or file exists but not device, return false with no error.
On other cases, return false with error from Lstat().
// IsDeviceBindMountExist returns true if specified file exists and the type is device . // If file doesn ' t exist or file exists but not device return false with no error . // On other cases return false with error from Lstat () .
func (v VolumePathHandler) IsDeviceBindMountExist(mapPath string) (bool, error) {
	fi, err := os.Lstat(mapPath)
	if err != nil {
		if os.IsNotExist(err) {
			return false, nil
		}
		return false, fmt.Errorf("failed to Lstat file %s: %v", mapPath, err)
	}
	if fi.Mode()&os.ModeDevice == os.ModeDevice {
		return true, nil
	}
	return false, nil
}
func ( v VolumePathHandler ) IsDeviceBindMountExist ( mapPath string ) ( bool , error ) { fi , err := os . Lstat ( mapPath ) if err != nil { if os . IsNotExist ( err ) { return false , nil } return false , fmt . Errorf ( " " , mapPath , err ) } if fi . Mode ( ) & os . ModeDevice == os . ModeDevice { return true , nil } return false , nil }
IsDeviceBindMountExist returns true if specified file exists and the type is device.
IsDeviceBindMountExist returns true if specified file exists and the type is device .
// If file doesn't exist, return false and no error // Return error from Lstat() // If file exits and it's device, return true and no error // If file exits but it's not device, return false and no error