Forum

    • Register
    • Login
    • Search
    • Categories

    Documents SubFolder File Access

    General Questions
    2
    5
    21
    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.
    • Fortune
      Fortune last edited by Fortune

      I can access a file which is located like Documents/My File.ext with this:

      (FileSystem.getFolder(FileSystem.Documents)).getChildFile("My File.ext");
      

      How can I access a file that is located under a subfolder of the Documents folder? For example:

      Documents/SubFolder/My File.ext

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

        @Fortune getChildFile() will also get subdirectories.

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

        Fortune 2 Replies Last reply Reply Quote 1
        • Fortune
          Fortune @d.healey last edited by

          @d-healey
          I've tried this but it doesn't work, am I missing something? Develop Branch from 03.15.2022

          (FileSystem.getFolder(FileSystem.Documents)).getChildFile("SubFolder/My File.ext");
          
          
          1 Reply Last reply Reply Quote 0
          • Fortune
            Fortune @d.healey last edited by

            @d-healey Ok, using the .getChildFile() separately works! Thank you!

            (FileSystem.getFolder(FileSystem.Documents)).getChildFile("SubFolder").getChildFile("My File.ext");
            
            
            d.healey 1 Reply Last reply Reply Quote 1
            • d.healey
              d.healey @Fortune last edited by d.healey

              @Fortune You don't need the extra () around FileSystem.getFolder()

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

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

              11
              Online

              741
              Users

              5.4k
              Topics

              50.3k
              Posts