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