Documentation ¶
Overview ¶
Package ZIPReader provides methods for working with ZIPReader object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsZIPReader() Instance
- func (self Instance) Close() error
- func (self Instance) FileExists(path string) bool
- func (self Instance) GetFiles() []string
- func (self Instance) Open(path string) error
- func (self Instance) ReadFile(path string) []byte
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Instance ¶
This class implements a reader that can extract the content of individual files inside a zip archive. [codeblock] func read_zip_file():
var reader := ZIPReader.new() var err := reader.open("user://archive.zip") if err != OK: return PackedByteArray() var res := reader.read_file("hello.txt") reader.close() return res
[/codeblock]
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsZIPReader ¶
func (Instance) FileExists ¶
Returns [code]true[/code] if the file exists in the loaded zip archive. Must be called after [method open].
func (Instance) GetFiles ¶
Returns the list of names of all files in the loaded archive. Must be called after [method open].
func (Instance) ReadFile ¶
Loads the whole content of a file in the loaded zip archive into memory and returns it. Must be called after [method open].