Example #1
0
func NewLibrary() (*Library, error) {
	l := C.create_C7ZipLibrary()
	if getBool(C.c7zLib_Initialize(l)) == false {
		err := getError(C.c7zLib_GetLastError(l))
		C.free_C7ZipLibrary(l)
		return nil, err
	}
	lib := &Library{l}
	return lib, nil
}
Example #2
0
func (lib *Library) lastError() error {
	return getError(C.c7zLib_GetLastError(lib.l))
}