MCPcopy Index your code
hub / github.com/OpenSIST/OpenSIST.github.io / getFile

Function getFile

src/Data/FileData.js:10–17  ·  view source on GitHub ↗
(fileId)

Source from the content-addressed store, hash-verified

8}
9
10export async function getFile(fileId) {
11 const files = await getFiles();
12 const file = files.find((currentFile) => currentFile.PostID.toString() === fileId.toString());
13 if (!file) {
14 throw new Error('File not found');
15 }
16 return file;
17}
18
19export async function getFileObject(fileId) {
20 const file = await getFile(fileId);

Callers 1

getFileObjectFunction · 0.85

Calls 1

getFilesFunction · 0.85

Tested by

no test coverage detected