(fileName: string)
| 204 | } |
| 205 | |
| 206 | async readFile(fileName: string) { |
| 207 | if (!this.check(fileName)) throw new Error(ERROR_MSG_01); |
| 208 | const absPath = this.toAbsolutePath(fileName); |
| 209 | const buf = await fs.readFile(absPath); |
| 210 | const text = iconv.decode(buf, this.fileCode || "utf-8"); |
| 211 | return text; |
| 212 | } |
| 213 | |
| 214 | async writeFile(fileName: string, data: string) { |
| 215 | if (!this.check(fileName)) throw new Error(ERROR_MSG_01); |
no test coverage detected