HISE Logo Forum
    • Categories
    • Register
    • Login

    fromAbsolutePath

    Scheduled Pinned Locked Moved General Questions
    12 Posts 3 Posters 283 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.
    • DanHD
      DanH
      last edited by

      I'm trying to use fromAbsolutePath on OSX. Is there a way of defining the "$HOME" directory like you can in bash scripts but in HISE?

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

        @DanH Same as bash ~/

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

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

          @d-healey ah yes, ok that seemed to work. It's returned an object. Do you know what I can do with that object?

          Basically I'm trying to get the location string out of an existing LinkOSX file and use it to write a new Link file in a different directory.

          EDIT - just found loadAsString. Getting somewhere with it...

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

            @DanH It's a File object, look up File in the api

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

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

              @d-healey :thumbs_up:

              Is there a Widows equivalent for ~/ or is it the same?

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

                @DanH Not sure. Where is the link file located? Is it in appData?

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

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

                  @d-healey it’s not. It’s in Roaming etc but under a different app name that will share the same sample folder. To avoid the user installing the samples twice I’m trying to make this work.

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

                    @DanH Roaming is in appdata, no?

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

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

                      @d-healey oh ha, yeah I thought you meant appData as in the Hise file system.

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

                        @DanH Don't use absolute paths unless absolutely necessary. If you want the (cross platform) folder for application data, just go two levels above your app data folder (it's always AppData/Company/Product

                        const var systemAppData = FileSystem.getFolder(FileSystem.AppData).getParentDirectory().getParentDirectory()
                        
                        DanHD 2 Replies Last reply Reply Quote 0
                        • DanHD
                          DanH @Christoph Hart
                          last edited by

                          This post is deleted!
                          1 Reply Last reply Reply Quote 0
                          • DanHD
                            DanH @Christoph Hart
                            last edited by

                            @Christoph-Hart great, all working so far, thanks!

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

                            61

                            Online

                            1.7k

                            Users

                            11.7k

                            Topics

                            101.8k

                            Posts