F
readFile
Reads a file's contents, resolving relative paths against documentsPath.
function readFile(path: string, encoding?: DCDFileManagerEncoding, inDocuments?: boolean): Promise<string>Parameters
| Name | Type | Description |
|---|---|---|
| path | string | The file path to read, relative to documentsPath unless |
| encoding? | DCDFileManagerEncoding | The encoding to read the file with. |
| inDocuments? | boolean | Whether to resolve |
Returns
Promise<string>A promise resolving to the file's contents.