// DatasetCreate create a new filesystem or volume on path representing
// pool/dataset or pool/parent/dataset
DatasetCreate create a new filesystem or volume on path representing
pool/dataset or pool/parent/dataset
// DatasetCreate create a new filesystem or volume on path representing // pool / dataset or pool / parent / dataset
func DatasetCreate(path string, dtype DatasetType,
	props map[Prop]Property) (d Dataset, err error) {
	var cprops C.nvlist_ptr
	if cprops, err = datasetPropertiesTonvlist(props); err != nil {
		return
	}
	defer C.nvlist_free(cprops)
	csPath := C.CString(path)
	errcode := C.dataset_create(csPath, C.zfs_type_t(dtype), cprops)
	C.free(unsafe.Pointer(csPath))
	if errcode != 0 {
		err = LastError()
		return
	}
	return DatasetOpen(path)
}
func DatasetCreate ( path string , dtype DatasetType , props map [ Prop ] Property ) ( d Dataset , err error ) { var cprops C . nvlist_ptr if cprops , err = datasetPropertiesTonvlist ( props ) ; err != nil { return } defer C . nvlist_free ( cprops ) csPath := C . CString ( path ) errcode := C . dataset_create ( csPath , C . zfs_type_t ( dtype ) , cprops ) C . free ( unsafe . Pointer ( csPath ) ) if errcode != 0 { err = LastError ( ) return } return DatasetOpen ( path ) }
DatasetCreate create a new filesystem or volume on path representing
pool/dataset or pool/parent/dataset
DatasetCreate create a new filesystem or volume on path representing pool / dataset or pool / parent / dataset