MCPcopy Create free account
hub / github.com/Xyntopia/taskyon / addSuffixToFile

Function addSuffixToFile

src/modules/OPFS.ts:77–85  ·  view source on GitHub ↗
(fileName: string, suffix: number)

Source from the content-addressed store, hash-verified

75}
76
77function addSuffixToFile(fileName: string, suffix: number): string {
78 const dotIndex = fileName.lastIndexOf('.');
79 if (dotIndex === -1) {
80 return `${fileName}-${suffix}`;
81 }
82 return `${fileName.substring(0, dotIndex)}-${suffix}${fileName.substring(
83 dotIndex
84 )}`;
85}
86
87export async function ls(dir: string) {
88 const storageRoot = await getRoot();

Callers 1

writeFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected