// Destroy destroys the dataset.  The caller must make sure that the filesystem
// isn't mounted, and that there are no active dependents. Set Defer argument
// to true to defer destruction for when dataset is not in use. Call Close() to
// cleanup memory.
Destroy destroys the dataset.  The caller must make sure that the filesystem
isn't mounted, and that there are no active dependents. Set Defer argument
to true to defer destruction for when dataset is not in use. Call Close() to
cleanup memory.
// Destroy destroys the dataset . The caller must make sure that the filesystem // isn ' t mounted and that there are no active dependents . Set Defer argument // to true to defer destruction for when dataset is not in use . Call Close () to // cleanup memory .
func (d *Dataset) Destroy(Defer bool) (err error) {
	if len(d.Children) > 0 {
		path, e := d.Path()
		if e != nil {
			return
		}
		dsType, e := d.GetProperty(DatasetPropType)
		if e != nil {
			dsType.Value = err.Error() 
		}
		err = errors.New("Cannot destroy dataset " + path +
			": " + dsType.Value + " has children")
		return
	}
	if d.list != nil {
		if ec := C.dataset_destroy(d.list, booleanT(Defer)); ec != 0 {
			err = LastError()
		}
	} else {
		err = errors.New(msgDatasetIsNil)
	}
	return
}
func ( d * Dataset ) Destroy ( Defer bool ) ( err error ) { if len ( d . Children ) > 0 { path , e := d . Path ( ) if e != nil { return } dsType , e := d . GetProperty ( DatasetPropType ) if e != nil { dsType . Value = err . Error ( ) } err = errors . New ( " " + path + " " + dsType . Value + " " ) return } if d . list != nil { if ec := C . dataset_destroy ( d . list , booleanT ( Defer ) ) ; ec != 0 { err = LastError ( ) } } else { err = errors . New ( msgDatasetIsNil ) } return }
Destroy destroys the dataset.
Destroy destroys the dataset .
// just put error (why it didn't fetch property type)