HISE Logo Forum
    • Categories
    • Register
    • Login

    FileSystem.getFolder(FileSystem.Downloads) -- not resolving correctly...

    Scheduled Pinned Locked Moved Bug Reports
    20 Posts 5 Posters 738 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.
    • LindonL
      Lindon @Christoph Hart
      last edited by Lindon

      @Christoph-Hart said in FileSystem.getFolder(FileSystem.Downloads) -- not resolving correctly...:

      If you want to cater in this case, check if the return type is undefined (FileSystem.getFolder checks if it exists and returns undefined if it doesn't), and then do something else, but this is not something that I can solve on the HISE level.

      except it is something you can check as Dave points out....its part of the user profile. In fact this should be the place HISE looks for it - not defaulting to a "C:" based solution.

      HISE Development for hire.
      www.channelrobot.com

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

        @d-healey said in FileSystem.getFolder(FileSystem.Downloads) -- not resolving correctly...:

        @Lindon FileSystem.getFolder(FileSystem.Temp)

        Seems to be missing from the docs - https://docs.hise.audio/scripting/scripting-api/filesystem/index.html

        Took a look in there - woah thats full of a lot of rubbish...could be a good candidate.

        I create a sub directory in the temp folder called "Libre Wave" and within that I create a directory for each product, then once it's downloaded I can easily clean up.

        Is it "always" there? can the user (foolishly) remove it?

        HISE Development for hire.
        www.channelrobot.com

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

          @Lindon said in FileSystem.getFolder(FileSystem.Downloads) -- not resolving correctly...:

          Is it "always" there? can the user (foolishly) remove it?

          A user can change it, but I'm not sure how HISE is retrieving it. I'll test it later.

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

          LindonL 1 Reply Last reply Reply Quote 0
          • LindonL
            Lindon @Lindon
            last edited by

            @Lindon said in FileSystem.getFolder(FileSystem.Downloads) -- not resolving correctly...:

            @Christoph-Hart said in FileSystem.getFolder(FileSystem.Downloads) -- not resolving correctly...:

            If you want to cater in this case, check if the return type is undefined (FileSystem.getFolder checks if it exists and returns undefined if it doesn't), and then do something else, but this is not something that I can solve on the HISE level.

            except it is something you can check as Dave points out....its part of the user profile. In fact this should be the place HISE looks for it - not defaulting to a "C:" based solution.

            -- except this is now starting to look messy - and not going to work anyway......its a badly documented Windows API call and even then it makes a bunch of assumptions, that dont seem to be very reliable.... hmm, Temp may be my friend.

            HISE Development for hire.
            www.channelrobot.com

            A 1 Reply Last reply Reply Quote 0
            • LindonL
              Lindon @d.healey
              last edited by

              @d-healey said in FileSystem.getFolder(FileSystem.Downloads) -- not resolving correctly...:

              @Lindon said in FileSystem.getFolder(FileSystem.Downloads) -- not resolving correctly...:

              Is it "always" there? can the user (foolishly) remove it?

              A user can change it, but I'm not sure how HISE is retrieving it. I'll test it later.

              thanks let me know how it goes...

              HISE Development for hire.
              www.channelrobot.com

              1 Reply Last reply Reply Quote 0
              • A
                aaronventure @Lindon
                last edited by

                @Lindon said in FileSystem.getFolder(FileSystem.Downloads) -- not resolving correctly...:

                Temp may be my friend

                Or your own company folder in APPDATA, that you always have permissions to create in case it's missing, so you just check if it's undefined, it so you create it, and then write whatever

                LindonL 1 Reply Last reply Reply Quote 0
                • LindonL
                  Lindon @aaronventure
                  last edited by

                  @aaronventure said in FileSystem.getFolder(FileSystem.Downloads) -- not resolving correctly...:

                  @Lindon said in FileSystem.getFolder(FileSystem.Downloads) -- not resolving correctly...:

                  Temp may be my friend

                  Or your own company folder in APPDATA, that you always have permissions to create in case it's missing, so you just check if it's undefined, it so you create it, and then write whatever

                  I'm leaning in towards this solution thanks. I like it because I pretty much know AppData is there if the plugin is running....

                  HISE Development for hire.
                  www.channelrobot.com

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

                    @Lindon one problem to be aware of with both app data and the temp folder is they are always on the system disk. If you have a large download there may not be enough room - especially with recent apple devices that have non replaceable disks.

                    I've ran into this issue before with users unable to download. My backup solution in these cases is they can download through their browser and install manually.

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

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

                      @d-healey said in FileSystem.getFolder(FileSystem.Downloads) -- not resolving correctly...:

                      @Lindon one problem to be aware of with both app data and the temp folder is they are always on the system disk. If you have a large download there may not be enough room - especially with recent apple devices that have non replaceable disks.

                      I've ran into this issue before with users unable to download. My backup solution in these cases is they can download through their browser and install manually.

                      yep - already covered there - I test there is enough space, and if not offer the "off-line" install which lets them setup from any folder on any drive that they have already downloaded the zipped files to.

                      Thanks tho.

                      HISE Development for hire.
                      www.channelrobot.com

                      1 Reply Last reply Reply Quote 2
                      • d.healeyD
                        d.healey
                        last edited by

                        @Lindon Good news, if you change the temp folder location the HISE constant still works :)

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

                        LindonL 1 Reply Last reply Reply Quote 1
                        • LindonL
                          Lindon @d.healey
                          last edited by

                          @d-healey said in FileSystem.getFolder(FileSystem.Downloads) -- not resolving correctly...:

                          @Lindon Good news, if you change the temp folder location the HISE constant still works :)

                          Great! _ I will bear this in mind - tho Im using Aaron's suggestion this time out....

                          HISE Development for hire.
                          www.channelrobot.com

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

                          39

                          Online

                          1.8k

                          Users

                          12.1k

                          Topics

                          105.8k

                          Posts