示例#1
0
文件: h5l.go 项目: simleb/go-hdf5
// File returns the file associated with this Location.
func (l *Location) File() *File {
	fid := C.H5Iget_file_id(l.id)
	if fid < 0 {
		return nil
	}
	return &File{Location{fid}}
}
示例#2
0
文件: h5i.go 项目: jonlawlor/go-hdf5
// File returns the file associated with this Identifier.
func (i Identifier) File() *File {
	fid := C.H5Iget_file_id(i.id)
	if fid < 0 {
		return nil
	}
	return &File{CommonFG{Location{Identifier{fid}}}}
}
示例#3
0
文件: h5i.go 项目: pauh/go-hdf5
// getFile returns an open File with which the object identified by id is associated.
// Returns nil if the file could not be opened.
func getFile(id C.hid_t) *File {
	fid := C.H5Iget_file_id(id)
	if fid < 0 {
		return nil
	}
	return &File{fid}
}