With the brand new file system how can I read multiple text files at once?

Not favoritedFavorited Favorited 0 favourites
  • 11 posts
From the Asset Store
News
$5 USD
Professional news theme track for broadcast intros, headlines, breaking news segments, business reports, and media progr
  • Since there is a way to select multiple files with the picker how do I read all of those files and put them each into different text boxes. There is absolutely no info on this since the update literally just dropped so I won't be surprised if no one knows how to do this either.

  • Yeah, you can access the list of picked files, but I see no way to read these files.

  • For reading files, can't you just use the old file chooser plug instead?

  • Never mind, it works the same way with the new file system plugin too.

    After picking files, you'll have a "directory" of all picked files, so just loop through each of the files (Repeat filesystem.filecount times) and display the contents.

  • Thanks this helps a lot.

  • What if 50 files are picked?

    These new plugins (File System, Cryptography) need "On Any Finished" trigger, similar to "On Any Request completed" in AJAX.

  • Hmm.... Good point.

    But for now with what we have, if I were doing bulk operations I would just use an untagged (or otherwise generic tag), and push the contents to an array as they complete. I don't know if they would be ordered, but there's no particularly explicit guarantee of order when choosing files anyway. If order were a consideration, I would implement sorting through the array based on content.

    The array size and file count can be compared to know when all files have been loaded into array, or throw an error of there was a mismatch somehow.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • It's also possible to put "On file operation complete" event inside of a loop, but this feels like a hack.

  • It's also possible to put "On file operation complete" event inside of a loop, but this feels like a hack.

    dop2000 - Sorry to hijack this thread but not sure how else to connect to you directly. I posted this a little while back and I seem to remember you doing something similar in the past. Is this something you're familiar with?

    Thanks!

  • These new plugins (File System, Cryptography) need "On Any Finished" trigger, similar to "On Any Request completed" in AJAX.

    I posted a suggestion, please vote if you agree:

    construct23.ideas.aha.io/ideas/C23-I-378

  • pandabear7413 please don't hijack other threads to connect with users. You can tag people directly in your own threads, or create a new one to ask a new question.

Jump to:
Active Users
There are 0 visitors browsing this topic (0 users and 0 guests)