createFile
Create a file in the Pod's filesystem
class BrowserPod { async createFile(path: string, mode: string): Promise<BinaryFile | TextFile>;}Parameters
- path (
string) - Path of the newly-created file. - mode (
string) - Opening mode. Either βbinaryβ or βutf-8β.
Returns
createFile returns a Promise which is resolved when the operation has succeded. The promise resolves to a
BinaryFile object if mode="binary", and to a TextFile object if mode="utf-8". If the file could not be created, the Promise will be rejected.