Browse Source

Update api.md

pull/575/head
KruserG 3 years ago committed by GitHub
parent
commit
2d0aa3f315
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      docs/api.md

4
docs/api.md

@ -159,7 +159,7 @@ Worker.readFile() remove a file in MEMFS, it is useful when you want to free the @@ -159,7 +159,7 @@ Worker.readFile() remove a file in MEMFS, it is useful when you want to free the
<a name="worker-FS"></a>
### Worker.FS(method, args, jobId): Promise
Worker.FS() is a generic FS function to do anything you want, you can check [HERE](ihttps://emscripten.org/docs/api_reference/Filesystem-API.html) for all functions.
Worker.FS() is a generic FS function to do anything you want, you can check [HERE](https://emscripten.org/docs/api_reference/Filesystem-API.html) for all functions.
**Arguments:**
@ -173,7 +173,7 @@ Worker.FS() is a generic FS function to do anything you want, you can check [HER @@ -173,7 +173,7 @@ Worker.FS() is a generic FS function to do anything you want, you can check [HER
(async () => {
await worker.FS('writeFile', ['tmp.txt', 'Hi\nTesseract.js\n']);
// equal to:
// await worker.readText('tmp.txt', 'Hi\nTesseract.js\n');
// await worker.writeText('tmp.txt', 'Hi\nTesseract.js\n');
})();
```

Loading…
Cancel
Save