MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / writeUtf16File

Function writeUtf16File

apps/cli/src/service.ts:719–727  ·  view source on GitHub ↗
(
  path: string,
  contents: string,
)

Source from the content-addressed store, hash-verified

717
718/** Write a UTF-16LE (BOM-prefixed) file — the encoding schtasks expects for XML. */
719const 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

Callers 1

makeWindowsBackendFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected