Filesystem.getFolder() Question!
-
Hey!
Can't believe I got this far already! All thanks to @d-healey! My next concern is on the
Filesystem.getFolder()
function. Basically here's my total situation: I have a preset browser with three viewports. The first viewport is from this topic which displays the folders in the User Presets folder. Then the second viewport, to the right of the first, will show the sub-level of the entry clicked on from the first. For example, if one dares to click on an entry in Viewport one, like a file browser, the folders contents will be displayed on viewport two. Then the third displays the preset files in the second's folders. I have made this callback for viewport one:inline function onvptBrowser0Control(component, value) { local browser0CurrentFolderName = browser0Folders[vptBrowser0.getValueNormalized()]; }; Content.getComponent("vptBrowser0").setControlCallback(onvptBrowser0Control);
in addition to the code mentioned in the topic linked above, this block gets the current folder name (with no extension (just realized either way it can't since it's a folder) or path) that's selected on the first viewport. Now to display the contents of that folder, i'd need to use
Filesystem.getFolder()
to get to the sub-level directory. Question is, what would I need to pass into the getfolder to make it work since the folder name would have no path, I know that to get to userpresets, we usedFilesystem.getFolder(FileSystem.UserPresets)
so is there a way to add onto the userpresets part to navigate to the selected viewport entry? Or am I doing it all wrong!Thanks again for reading this essay!
-
@Casmat getFolder is only used to get the top level folder. After that you use getChildFile
-
@d-healey Thanks! works when used
thanks.getChildFile(foldername);
wherethanks
is the variable that uses theFilesystem.getFolder()
function!