MCPcopy Create free account
hub / github.com/Martchus/tageditor / openOriginalFile

Function openOriginalFile

resources/scripts/scriptapi/helpers.js:55–63  ·  view source on GitHub ↗
(file)

Source from the content-addressed store, hash-verified

53}
54
55export function openOriginalFile(file) {
56 const originalDir = settings.originalDir;
57 const originalExt = settings.originalExt || file.extension;
58 if (originalDir && file.pathRelative) {
59 const name = file.nameWithoutExtension;
60 const path = [originalDir, file.containingDirectory, name + originalExt].join("/");
61 return cacheValue(fileCache, path, () => utility.openFile(path));
62 }
63}

Callers

nothing calls this directly

Calls 2

cacheValueFunction · 0.85
openFileMethod · 0.80

Tested by

no test coverage detected