Skip to content

Class FileSystem

🏭 Constructors

constructor

ts
new FileSystem(): FileSystem

Return Type

  • FileSystem

🏷️ Properties

root readonly abstract

ts
root: string

Defined in: packages/system/system.ts:2

sep readonly abstract

ts
sep: string

Defined in: packages/system/system.ts:3

type readonly abstract

ts
type: "path" | "zip"

Defined in: packages/system/system.ts:4

writeable readonly abstract

ts
writeable: boolean

Defined in: packages/system/system.ts:5

🔧 Methods

cd abstract

ts
cd(name: string): void

Parameters

  • name: string

Return Type

  • void

Defined in: packages/system/system.ts:25

close

ts
close(): void

Return Type

  • void

Defined in: packages/system/system.ts:28

existsFile abstract

ts
existsFile(name: string): Promise<boolean>

Parameters

  • name: string

Return Type

  • Promise<boolean>

Defined in: packages/system/system.ts:12

getUrl

ts
getUrl(name: string): string

Get the url for a file entry. If the system does not support get url. This should return an empty string.

Parameters

  • name: string

Return Type

  • string

Defined in: packages/system/system.ts:21

isClosed

ts
isClosed(): boolean

Return Type

  • boolean

Defined in: packages/system/system.ts:27

isDirectory abstract

ts
isDirectory(name: string): Promise<boolean>

Parameters

  • name: string

Return Type

  • Promise<boolean>

Defined in: packages/system/system.ts:11

join abstract

ts
join(paths: string[]): string

Parameters

  • paths: string[]

Return Type

  • string

Defined in: packages/system/system.ts:9

listFiles abstract

ts
listFiles(name: string): Promise<string[]>

Parameters

  • name: string

Return Type

  • Promise<string[]>

Defined in: packages/system/system.ts:23

missingFile

ts
missingFile(name: string): Promise<boolean>

Parameters

  • name: string

Return Type

  • Promise<boolean>

Defined in: packages/system/system.ts:32

readFile abstract

ts
readFile(name: string, encoding: "utf-8" | "base64"): Promise<string>

Parameters

  • name: string
  • encoding: "utf-8" | "base64"

Return Type

  • Promise<string>
ts
readFile(name: string, encoding: undefined): Promise<Uint8Array>

Parameters

  • name: string
  • encoding: undefined

Return Type

  • Promise<Uint8Array>
ts
readFile(name: string): Promise<Uint8Array>

Parameters

  • name: string

Return Type

  • Promise<Uint8Array>
ts
readFile(name: string, encoding: "utf-8" | "base64"): Promise<string | Uint8Array>

Parameters

  • name: string
  • encoding: "utf-8" | "base64"

Return Type

  • Promise<string | Uint8Array>

Defined in: packages/system/system.ts:13, packages/system/system.ts:14, packages/system/system.ts:15, packages/system/system.ts:16

walkFiles

ts
walkFiles(target: string, walker: Function): Promise<void>

Parameters

  • target: string
  • walker: Function

Return Type

  • Promise<void>

Defined in: packages/system/system.ts:36