( path: string, contents: string, )
| 717 | |
| 718 | /** Write a UTF-16LE (BOM-prefixed) file — the encoding schtasks expects for XML. */ |
| 719 | const writeUtf16File = ( |
| 720 | path: string, |
| 721 | contents: string, |
| 722 | ): Effect.Effect<void, Error | PlatformError, FileSystem.FileSystem> => |
| 723 | Effect.gen(function* () { |
| 724 | const fs = yield* FileSystem.FileSystem; |
| 725 | const bytes = Buffer.from(`${contents}`, "utf16le"); |
| 726 | yield* fs.writeFile(path, new Uint8Array(bytes)); |
| 727 | }); |
| 728 | |
| 729 | /** |
| 730 | * SCHED_S_TASK_RUNNING — the Task Scheduler HRESULT a task reports as its "Last |
no outgoing calls
no test coverage detected