Skip to content

Class FileSystem

🏭 Constructors

constructor

ts
new FileSystem(): FileSystem

Return Type

  • FileSystem

🏷️ Properties

root

ts
root: string

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

sep

ts
sep: string

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

type

ts
type: "path" | "zip"

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

writeable

ts
writeable: boolean

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

🔧 Methods

cd

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

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

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

Parameters

  • name: string

Return Type

  • Promise<boolean>

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

join

ts
join(paths: string[]): string

Parameters

  • paths: string[]

Return Type

  • string

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

listFiles

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

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

Released under the MIT License.