HISE Logo Forum
    • Categories
    • Register
    • Login

    Filesystem.getFolder() Question!

    Scheduled Pinned Locked Moved Scripting
    3 Posts 2 Posters 193 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • CasmatC
      Casmat
      last edited by

      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 used Filesystem.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!

      i make music

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @Casmat
        last edited by

        @Casmat getFolder is only used to get the top level folder. After that you use getChildFile

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        CasmatC 1 Reply Last reply Reply Quote 0
        • CasmatC
          Casmat @d.healey
          last edited by

          @d-healey Thanks! works when used thanks.getChildFile(foldername); where thanks is the variable that uses the Filesystem.getFolder() function!

          i make music

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          19

          Online

          1.8k

          Users

          12.0k

          Topics

          104.6k

          Posts