(
path: string,
options?: { encoding?: BufferEncoding; errors?: 'strict' | 'replace' | 'ignore' },
)
| 713 | } |
| 714 | |
| 715 | async readText( |
| 716 | path: string, |
| 717 | options?: { encoding?: BufferEncoding; errors?: 'strict' | 'replace' | 'ignore' }, |
| 718 | ): Promise<string> { |
| 719 | const encoding = options?.encoding ?? 'utf-8'; |
| 720 | const errors = options?.errors ?? 'strict'; |
| 721 | const data = await sftpReadFile(this._sftp, this._resolvePath(path)); |
| 722 | return decodeTextWithErrors(data, encoding, errors); |
| 723 | } |
| 724 | |
| 725 | async *readLines( |
| 726 | path: string, |
no test coverage detected