cancel
Showing results for 
Search instead for 
Did you mean: 

childByNamePath(targetFile) returns null?

targa2000
Champ in-the-making
Champ in-the-making
I'm moving through the directory tree of the repository using a recursive function call in Javascript. 

In this recursive call, I'm using space.childByNamePath() to grab references to content and folders in the repository.  If I find a folder, I make a recursive call to the function and then parse the information in this subdirectory.  Its works well for the first folder and it's sub-folder, but more than 1 layer deep, space.childByNamePath() can' t seem to find the files.  Is there a depth limitation to space.childByNamePath()?  Also tried document.childByNamePath() but no better.  Is there another object and function I should use when traversing down the repository content and folder tree?
1 REPLY 1

invictus9
Champ in-the-making
Champ in-the-making
I'm pretty sure that if you are in a space called 'ts' then
ts.children
yields a list of the children in the space.