HISE Logo Forum
    • Categories
    • Register
    • Login

    FileSystem API - Possible to save a file to a child directory?

    Scheduled Pinned Locked Moved Scripting
    4 Posts 3 Posters 346 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.
    • Casey KolbC
      Casey Kolb
      last edited by Casey Kolb

      This might have a simple answer, but I'm not sure how to save a file to a child directory using the FileSystem API. For example, how would I store a file in UserPresets/SpecificPresetFolder?

      You can easily get to the UserPreset directory with FileSystem.getFolder(FileSystem.UserPresets) but I don't know how to get to a directory within that because according to the docs you can't use absolutely paths with the FileSystem API. Thoughts? Am I missing something really obvious?

      Casey Kolb
      Founder & CEO of Lunacy Audio
      Composer | Producer | Software Developer

      1 Reply Last reply Reply Quote 0
      • Casey KolbC
        Casey Kolb
        last edited by

        Ignore me...I obviously only figure things out immediately after I post them 😂

        This works:

        FileSystem.getFolder(FileSystem.UserPresets).getChildFile("CustomFolder/AnotherCustomFolder");
        

        Casey Kolb
        Founder & CEO of Lunacy Audio
        Composer | Producer | Software Developer

        Dan KorneffD DalartD 2 Replies Last reply Reply Quote 1
        • Dan KorneffD
          Dan Korneff @Casey Kolb
          last edited by

          @Lunacy-Audio That's what usually happens to me 🙃

          Dan Korneff - Producer / Mixer / Audio Nerd

          1 Reply Last reply Reply Quote 1
          • DalartD
            Dalart @Casey Kolb
            last edited by

            @Lunacy-Audio said in FileSystem API - Possible to save a file to a child directory?:

            Ignore me...I obviously only figure things out immediately after I post them 😂

            Haha I think most of us have done that before :)

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

            57

            Online

            1.7k

            Users

            11.7k

            Topics

            102.1k

            Posts