MCPcopy Index your code
hub / github.com/ollm/OpenComic / allCompressedFiles

Function allCompressedFiles

scripts/file-manager.js:3082–3106  ·  view source on GitHub ↗
(path, index = 0)

Source from the content-addressed store, hash-verified

3080}
3081
3082function allCompressedFiles(path, index = 0)
3083{
3084 let segments = splitPath(path);
3085 let len = segments.length;
3086
3087 let newPath = (len > 0) ? (isEmpty(segments[0]) ? '/' : segments[0]) : '';
3088 let numSegments = len + index;
3089
3090 let lastCompressed = false;
3091
3092 let files = [];
3093
3094 for(let i = 1; i < len; i++)
3095 {
3096 newPath = join(newPath, segments[i]);
3097
3098 if(i < numSegments)
3099 {
3100 if(compatible.compressed(newPath))
3101 files.push(newPath);
3102 }
3103 }
3104
3105 return files;
3106}
3107
3108function containsCompressed(path, index = 0)
3109{

Callers 1

fileFunction · 0.85

Calls 3

splitPathFunction · 0.85
isEmptyFunction · 0.85
joinFunction · 0.85

Tested by

no test coverage detected