@loopback/docs
Version:
Documentation for LoopBack 4
35 lines (22 loc) • 930 B
Markdown
lang: en
title: 'API docs: testlab.testsandbox.writetextfile'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.testlab.testsandbox.writetextfile.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/testlab](./testlab.md) > [TestSandbox](./testlab.testsandbox.md) > [writeTextFile](./testlab.testsandbox.writetextfile.md)
## TestSandbox.writeTextFile() method
Creates a new file and writes the given data as a UTF-8-encoded text.
<b>Signature:</b>
```typescript
writeTextFile(dest: string, data: string): Promise<void>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| dest | <code>string</code> | Destination filename, optionally including a relative path. |
| data | <code>string</code> | The text to write. |
<b>Returns:</b>
`Promise<void>`