B4J Question File.ReadList - Is Order Guaranteed?

tchart

Well-Known Member
Licensed User
Longtime User
As per title, is the order of File.ReadList guaranteed to be the same as the files lines?

Ive got a scenario where I need to check the first few lines of a file to ensure its the correct type of file.
 

tchart

Well-Known Member
Licensed User
Longtime User
Awesome, Ive also checked this, and it seems reliable.

B4X:
    Dim l As List
    l.Initialize
   
    For c = 0 To 1000000
        l.Add(c)
    Next
   
    File.WriteList(File.DirApp,"out.txt",l)
   
    Dim l2 As List = File.ReadList(File.DirApp,"out.txt")
   
    Log(l2.Get(0))
    Log(l2.Get(l2.Size-1))
 
Upvote 0
Top