사소한 리팩토링

This commit is contained in:
static committed 2026-10-20 03:12:53 +09:00
1 parent d986493431
commit 48bf9c1165
62 files changed
+31 -39

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
import { mkdir, writeFile } from "fs/promises";
import { dirname, join } from "path";
import env from "#lib/server/config.ts";
let sequence = 0;
export const createStoredFile = async (content: string | Buffer = "content") => {
const path = join(env.libraryPath, "test", `file${++sequence}`);
await mkdir(dirname(path), { recursive: true });
await writeFile(path, content);
return path;
};