コード例 #1
0
ファイル: h5f.go プロジェクト: pombredanne/go-hdf5
// Terminates access to an HDF5 file.
func (f *File) Close() error {
	var err error = nil
	if f.id > 0 {
		err = togo_err(C.H5Fclose(f.id))
		f.id = 0
	}
	return err
}
コード例 #2
0
ファイル: h5f.go プロジェクト: jonlawlor/go-hdf5
// Terminates access to an HDF5 file.
func (f *File) Close() error {
	if f.id == 0 {
		return nil
	}
	err := h5err(C.H5Fclose(f.id))
	f.id = 0
	return err
}
コード例 #3
0
ファイル: main.go プロジェクト: postfix/hdf5
// Close closes the file.
func (f *File) Close() error {
	if err := C.H5Fclose(f.fid); err != 0 {
		return errors.New("failed to close the file")
	}
	return nil
}