nl_tokens: helper - create ancestors list from path
pl_tokens: function getPathAncestors ( filename ) { var tree = filename . split ( '/' ) ; <mask> . pop ( ) ; // remove last var treePath = [ ] ; for ( var i = 0 ; i < tree . length ; i ++ ) { treePath . push ( createId ( tree , i ) ) ; } function createId ( tree , count ) { var id = '' ; for ( var i = 0 ; i <= count ; i ++ ) { id += ( i > 0 ? '/' : '' ) + tree [ i ] ; } return id ; } return treePath ; }