// SetProperty set ZFS dataset property to value. Not all properties can be set,
// some can be set only at creation time and some are read only.
// Always check if returned error and its description.
SetProperty set ZFS dataset property to value. Not all properties can be set,
some can be set only at creation time and some are read only.
Always check if returned error and its description.
// SetProperty set ZFS dataset property to value . Not all properties can be set // some can be set only at creation time and some are read only . // Always check if returned error and its description .
func (d *Dataset) SetProperty(p Prop, value string) (err error) {
	if d.list == nil {
		err = errors.New(msgDatasetIsNil)
		return
	}
	csValue := C.CString(value)
	errcode := C.dataset_prop_set(d.list, C.zfs_prop_t(p), csValue)
	C.free(unsafe.Pointer(csValue))
	if errcode != 0 {
		err = LastError()
	}
	if _, err = d.GetProperty(p); err != nil {
		return
	}
	return
}
func ( d * Dataset ) SetProperty ( p Prop , value string ) ( err error ) { if d . list == nil { err = errors . New ( msgDatasetIsNil ) return } csValue := C . CString ( value ) errcode := C . dataset_prop_set ( d . list , C . zfs_prop_t ( p ) , csValue ) C . free ( unsafe . Pointer ( csValue ) ) if errcode != 0 { err = LastError ( ) } if _ , err = d . GetProperty ( p ) ; err != nil { return } return }
SetProperty set ZFS dataset property to value.
SetProperty set ZFS dataset property to value .
// Update Properties member with change made