Class FileSystem
🏭 Constructors
constructor
new FileSystem(): FileSystem
Return Type
FileSystem
🏷️ Properties
root readonly abstract
root: string
Defined in: packages/system/system.ts:2
sep readonly abstract
sep: string
Defined in: packages/system/system.ts:3
type readonly abstract
type: "path" | "zip"
Defined in: packages/system/system.ts:4
writeable readonly abstract
writeable: boolean
Defined in: packages/system/system.ts:5
🔧 Methods
cd abstract
cd(name: string): void
Parameters
- name:
string
Return Type
void
Defined in: packages/system/system.ts:25
close
close(): void
Return Type
void
Defined in: packages/system/system.ts:28
existsFile abstract
existsFile(name: string): Promise<boolean>
Parameters
- name:
string
Return Type
Promise<boolean>
Defined in: packages/system/system.ts:12
getUrl
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
isClosed(): boolean
Return Type
boolean
Defined in: packages/system/system.ts:27
isDirectory abstract
isDirectory(name: string): Promise<boolean>
Parameters
- name:
string
Return Type
Promise<boolean>
Defined in: packages/system/system.ts:11
join abstract
join(paths: string[]): string
Parameters
- paths:
string[]
Return Type
string
Defined in: packages/system/system.ts:9
listFiles abstract
listFiles(name: string): Promise<string[]>
Parameters
- name:
string
Return Type
Promise<string[]>
Defined in: packages/system/system.ts:23
missingFile
missingFile(name: string): Promise<boolean>
Parameters
- name:
string
Return Type
Promise<boolean>
Defined in: packages/system/system.ts:32
readFile abstract
readFile(name: string, encoding: "utf-8" | "base64"): Promise<string>
Parameters
- name:
string
- encoding:
"utf-8" | "base64"
Return Type
Promise<string>
readFile(name: string, encoding: undefined): Promise<Uint8Array>
Parameters
- name:
string
- encoding:
undefined
Return Type
Promise<Uint8Array>
readFile(name: string): Promise<Uint8Array>
Parameters
- name:
string
Return Type
Promise<Uint8Array>
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
walkFiles(target: string, walker: Function): Promise<void>
Parameters
- target:
string
- walker:
Function
Return Type
Promise<void>
Defined in: packages/system/system.ts:36