-
Notifications
You must be signed in to change notification settings - Fork 5
RemoteZeroFS
RemoteZeroFS constructor(ZeroPage page, String address)
Creates a new RemoteZeroFS instance from ZeroPage object.
The RemoteZeroFS object gives you access to filesystem of
address
site via CORS. The methods work the same way as in ZeroFS.
Promise<String|Uint8Array> readFile(String file, "arraybuffer"|Boolean bytes=false
, Boolean required=false
)
Promise<String|Uint8Array> peekFile(String file, Number offset, Number length, "arraybuffer"|Boolean bytes)
Promise<Boolean> fileExists(String file)
Promise<Array<String>> readDirectory(String dir, Boolean recursive=false
)
Promise<"file"|"dir"> getType(String file)
All work the same way as their ZeroFS analogues.
Promise writeFile(String file, String|Uint8Array content, "arraybuffer"|Boolean bytes=false
)
Promise deleteFile(String file)
Reject
String("Remote FS cannot be changed")
.