HISE Logo Forum
    • Categories
    • Register
    • Login

    FileSystem.findFileSystemRoots() returns no attached drives on MacOS

    Scheduled Pinned Locked Moved Solved Bug Reports
    8 Posts 2 Posters 380 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.
    • gorangroovesG
      gorangrooves
      last edited by

      @Christoph-Hart FileSystem.findFileSystemRoots() works as expected on Windows, but on MacOS, it doesn't return any attached drives, making it impossible to browse them.

      Goran Rista
      https://gorangrooves.com

      Handy Drums and Handy Grooves
      https://library.gorangrooves.com

      gorangroovesG 1 Reply Last reply Reply Quote 0
      • gorangroovesG
        gorangrooves @gorangrooves
        last edited by

        @Christoph-Hart, Any chance of having this fixed in the near future, please?

        Goran Rista
        https://gorangrooves.com

        Handy Drums and Handy Grooves
        https://library.gorangrooves.com

        Christoph HartC 1 Reply Last reply Reply Quote 0
        • Christoph HartC
          Christoph Hart @gorangrooves
          last edited by

          @gorangrooves yeah I looked into it, there's not much I can do here, it's default macOS behaviour (if you search in the JUCE forum there are others with the same problem).

          gorangroovesG 1 Reply Last reply Reply Quote 0
          • gorangroovesG
            gorangrooves @Christoph Hart
            last edited by

            @Christoph-Hart So, is this a JUCE bug? Obviously, countless Mac apps can access all connected drives, so this can't be impossible on Mac.

            Goran Rista
            https://gorangrooves.com

            Handy Drums and Handy Grooves
            https://library.gorangrooves.com

            Christoph HartC 1 Reply Last reply Reply Quote 0
            • Christoph HartC
              Christoph Hart @gorangrooves
              last edited by

              @gorangrooves sure you can access them, browse with a native file browser and load them but the function that queries all system roots doesn‘t include external disks apparently.

              Christoph HartC 1 Reply Last reply Reply Quote 0
              • Christoph HartC
                Christoph Hart @Christoph Hart
                last edited by Christoph Hart

                So looked again, and it seems that macOS is simply not supposed to return the list of volumes when you query the root.

                But you can do this:

                const var f = FileSystem.fromAbsolutePath("/Volumes");
                const var l = FileSystem.findFiles(f, "*", false);
                
                gorangroovesG 2 Replies Last reply Reply Quote 3
                • gorangroovesG
                  gorangrooves @Christoph Hart
                  last edited by

                  @Christoph-Hart Thank you. Browsing with a native file browser is not really an option since this is for an integrated file browser 😁

                  Your solution seems promising. Let me see if I can implement that. I'll report back.

                  Goran Rista
                  https://gorangrooves.com

                  Handy Drums and Handy Grooves
                  https://library.gorangrooves.com

                  1 Reply Last reply Reply Quote 0
                  • gorangroovesG
                    gorangrooves @Christoph Hart
                    last edited by

                    @Christoph-Hart I am delighted to report that the method you provided here works like a charm! Thank you so much!

                    For anyone using it, just remember to set the condition that if

                    Engine.getOS() == "OSX"
                    

                    use the method above and place those variables as 'var' inside the condition.

                    Goran Rista
                    https://gorangrooves.com

                    Handy Drums and Handy Grooves
                    https://library.gorangrooves.com

                    1 Reply Last reply Reply Quote 1
                    • gorangroovesG gorangrooves marked this topic as a question on
                    • gorangroovesG gorangrooves has marked this topic as solved on
                    • First post
                      Last post

                    12

                    Online

                    1.7k

                    Users

                    11.8k

                    Topics

                    102.4k

                    Posts