MCPcopy Create free account
hub / github.com/error311/FileRise / ancestors

Function ancestors

public/js/adminFolderAccess.js:918–931  ·  view source on GitHub ↗
(folder)

Source from the content-addressed store, hash-verified

916 };
917
918 const ancestors = (folder) => {
919 if (!folder || folder === 'root') return [];
920 const parts = folder.split('/').filter(Boolean);
921 const out = [];
922 while (parts.length) {
923 parts.pop();
924 if (!parts.length) {
925 out.push('root');
926 } else {
927 out.push(parts.join('/'));
928 }
929 }
930 return out;
931 };
932
933 userGroups.forEach(g => {
934 folderList.forEach(folder => {

Callers 1

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected