Can you confirm that TStringList.LoadFromFile works synchronously?

In the example TMSWeb_RegExMatches I found code that implied that the above mentioned method works synchronous, despite reading a file from the server.
I tried it myself, and in my case, it worked.

So, because I didn't find any info on this in the docs, can you confirm that this method always works in an synchronous way?

LoadFromFile() works synchronously

Great, thank you!

Another small problem:

Comparing the TStringList.LoadFromFile() method, there is a difference between Windows and Web:

  • Create sample file test.txt with NotePad with 5 lines. (When looking into the file, every line has ending $0D $0A = CR+LF. There is no empty line at the end!)
  • Now, when reading with the above mentioned method, in Windows the stringlist.count equals 5, but in Web the stringlist.count equals 6.
  • When console.log() all .strings[], you see an empty line at last position

So, is this difference between Win and Web intended?

This is not intended. We'll need to investigate. The cause could be in the pas2js RTL TStrings base class.