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

Function writeUtf16File

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

Source from the content-addressed store, hash-verified

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

Callers 1

makeWindowsBackendFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected