Skip to content

Class UnzipTask

🏭 Constructors

constructor

ts
new UnzipTask(zipFile: ZipFile, entries: Entry[], destination: string, resolver: EntryResolver= ..., interpreter: Function= ...): UnzipTask

Parameters

  • zipFile: ZipFile
  • entries: Entry[]
  • destination: string
  • resolver: EntryResolver
  • interpreter: Function

Return Type

  • UnzipTask

Defined in: packages/installer/unzip.ts:22

🏷️ Properties

_from protected

ts
_from: undefined | string

Inherited from: BaseTask._from

Defined in: packages/task/index.ts:80

_id protected

ts
_id: number = 0

Inherited from: BaseTask._id

Defined in: packages/task/index.ts:85

_path protected

ts
_path: string = ''

Inherited from: BaseTask._path

Defined in: packages/task/index.ts:84

_progress protected

ts
_progress: number = 0

Inherited from: BaseTask._progress

Defined in: packages/task/index.ts:82

_promise protected

ts
_promise: Promise<void>

Inherited from: BaseTask._promise

Defined in: packages/task/index.ts:75

_state protected

ts
_state: TaskState = TaskState.Idle

Inherited from: BaseTask._state

Defined in: packages/task/index.ts:74

_to protected

ts
_to: undefined | string

Inherited from: BaseTask._to

Defined in: packages/task/index.ts:81

_total protected

ts
_total: number = -1

Inherited from: BaseTask._total

Defined in: packages/task/index.ts:83

context

ts
context: TaskContext = {}

Inherited from: BaseTask.context

Defined in: packages/task/index.ts:88

entries readonly

ts
entries: Entry[]

Defined in: packages/installer/unzip.ts:22

interpreter readonly

ts
interpreter: Function = ...

Defined in: packages/installer/unzip.ts:22

name

ts
name: string = ''

Inherited from: BaseTask.name

Defined in: packages/task/index.ts:90

param

ts
param: object = {}

Inherited from: BaseTask.param

Defined in: packages/task/index.ts:91

parent

ts
parent: undefined | Task<any>

Inherited from: BaseTask.parent

Defined in: packages/task/index.ts:87

reject protected

ts
reject: Function

Inherited from: BaseTask.reject

Defined in: packages/task/index.ts:78

resolve protected

ts
resolve: Function

Inherited from: BaseTask.resolve

Defined in: packages/task/index.ts:77

resolver readonly

ts
resolver: EntryResolver = ...

Defined in: packages/installer/unzip.ts:22

resultOrError protected

ts
resultOrError: any

Inherited from: BaseTask.resultOrError

Defined in: packages/task/index.ts:93

streams private

ts
streams: [Readable, Writable][] = []

Defined in: packages/installer/unzip.ts:19

zipFile readonly

ts
zipFile: ZipFile

Defined in: packages/installer/unzip.ts:22

🔑 Accessors

from

Inherited from: BaseTask.from

Defined in: packages/task/index.ts:121

id

Inherited from: BaseTask.id

Defined in: packages/task/index.ts:116

isCancelled

Inherited from: BaseTask.isCancelled

Defined in: packages/task/index.ts:124

isDone

Inherited from: BaseTask.isDone

Defined in: packages/task/index.ts:126

isPaused

Inherited from: BaseTask.isPaused

Defined in: packages/task/index.ts:125

isRunning

Inherited from: BaseTask.isRunning

Defined in: packages/task/index.ts:127

path

Inherited from: BaseTask.path

Defined in: packages/task/index.ts:117

progress

Inherited from: BaseTask.progress

Defined in: packages/task/index.ts:118

state

Inherited from: BaseTask.state

Defined in: packages/task/index.ts:122

to

Inherited from: BaseTask.to

Defined in: packages/task/index.ts:120

total

Inherited from: BaseTask.total

Defined in: packages/task/index.ts:119

🔧 Methods

_onCancelled private

ts
_onCancelled(): void

Return Type

  • void

Defined in: packages/installer/unzip.ts:20

cancel

ts
cancel(timeout: number): Promise<void>

Parameters

  • timeout: number

Return Type

  • Promise<void>

Inherited from: BaseTask.cancel

Defined in: packages/task/index.ts:145

cancelTask protected

ts
cancelTask(): Promise<void>

Return Type

  • Promise<void>

Defined in: packages/installer/unzip.ts:76

get

ts
get(): void

Return Type

  • void

Inherited from: BaseTask.get

Defined in: packages/task/index.ts:108

handleEntry protected

ts
handleEntry(entry: Entry, relativePath: string): Promise<void>

Parameters

  • entry: Entry
  • relativePath: string

Return Type

  • Promise<void>

Defined in: packages/installer/unzip.ts:27

map

ts
map(transform: Transform<UnzipTask, N>): Task<N extends Promise<R> ? R : N>

Parameters

  • transform: Transform<UnzipTask, N>

Return Type

  • Task<N extends Promise<R> ? R : N>

Inherited from: BaseTask.map

Defined in: packages/task/index.ts:212

onChildUpdate

ts
onChildUpdate(chunkSize: number): void

Parameters

  • chunkSize: number

Return Type

  • void

Inherited from: BaseTask.onChildUpdate

Defined in: packages/task/index.ts:205

pause

ts
pause(): Promise<void>

Return Type

  • Promise<void>

Inherited from: BaseTask.pause

Defined in: packages/task/index.ts:129

pauseTask protected

ts
pauseTask(): Promise<void>

Return Type

  • Promise<void>

Defined in: packages/installer/unzip.ts:88

resume

ts
resume(): Promise<void>

Return Type

  • Promise<void>

Inherited from: BaseTask.resume

Defined in: packages/task/index.ts:137

resumeTask protected

ts
resumeTask(): Promise<void>

Return Type

  • Promise<void>

Defined in: packages/installer/unzip.ts:97

runTask protected

ts
runTask(): Promise<void>

Return Type

  • Promise<void>

Defined in: packages/installer/unzip.ts:52

setName

ts
setName(name: string, param: object): UnzipTask

Parameters

  • name: string
  • param: object

Return Type

  • UnzipTask

Inherited from: BaseTask.setName

Defined in: packages/task/index.ts:102

start

ts
start(context: TaskContext, parent: Task<any>): void

Parameters

  • context: TaskContext
  • parent: Task<any>

Return Type

  • void

Inherited from: BaseTask.start

Defined in: packages/task/index.ts:164

startAndWait

ts
startAndWait(context: TaskContext, parent: Task<any>): Promise<void>

Parameters

  • context: TaskContext
  • parent: Task<any>

Return Type

  • Promise<void>

Inherited from: BaseTask.startAndWait

Defined in: packages/task/index.ts:195

update protected

ts
update(chunkSize: number): void

Parameters

  • chunkSize: number

Return Type

  • void

Inherited from: BaseTask.update

Defined in: packages/task/index.ts:200

wait

ts
wait(): Promise<void>

Return Type

  • Promise<void>

Inherited from: BaseTask.wait

Defined in: packages/task/index.ts:160