ZIPReader

package
v0.0.0-...-546f9d4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package ZIPReader provides methods for working with ZIPReader object instances.

Index

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 Any

type Any interface {
	gd.IsClass
	AsZIPReader() Instance
}

type Instance

type Instance [1]gdclass.ZIPReader

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 New

func New() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsZIPReader

func (self Instance) AsZIPReader() Instance

func (Instance) Close

func (self Instance) Close() error

Closes the underlying resources used by this instance.

func (Instance) FileExists

func (self Instance) FileExists(path string) bool

Returns [code]true[/code] if the file exists in the loaded zip archive. Must be called after [method open].

func (Instance) GetFiles

func (self Instance) GetFiles() []string

Returns the list of names of all files in the loaded archive. Must be called after [method open].

func (Instance) Open

func (self Instance) Open(path string) error

Opens the zip archive at the given [param path] and reads its file index.

func (Instance) ReadFile

func (self Instance) ReadFile(path string) []byte

Loads the whole content of a file in the loaded zip archive into memory and returns it. Must be called after [method open].

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL