Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

477 B
Raw Blame
import { stat } from "node:fs/promises";
import { expect } from "vitest";
import { windowsPrivatePath } from "../windows-private.js";

export async function expectPrivate(
  file: string,
  kind: "file" | "directory" = "file",
): Promise<void> {
  if (process.platform === "win32") {
    await expect(windowsPrivatePath(file, kind)).resolves.toBeUndefined();
  } else {
    expect((await stat(file)).mode & 0o777).toBe(
      kind === "directory" ? 0o700 : 0o600,
    );
  }
}