(
path: string,
data: string,
options?: { mode?: 'w' | 'a'; encoding?: BufferEncoding },
)
| 654 | } |
| 655 | |
| 656 | async writeText( |
| 657 | path: string, |
| 658 | data: string, |
| 659 | options?: { mode?: 'w' | 'a'; encoding?: BufferEncoding }, |
| 660 | ): Promise<number> { |
| 661 | const resolved = this._resolvePath(path); |
| 662 | const encoding = options?.encoding ?? 'utf-8'; |
| 663 | const mode = options?.mode ?? 'w'; |
| 664 | if (mode === 'a') { |
| 665 | await appendFile(resolved, data, encoding); |
| 666 | } else { |
| 667 | await writeFile(resolved, data, encoding); |
| 668 | } |
| 669 | return data.length; |
| 670 | } |
| 671 | |
| 672 | async mkdir(path: string, options?: { parents?: boolean; existOk?: boolean }): Promise<void> { |
| 673 | const resolved = this._resolvePath(path); |
nothing calls this directly
no test coverage detected