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