Modify

Opened 17 years ago

Closed 16 years ago

#682 closed Feature Request (Completed)

Remove 64K line limit for FileReadLine()

Reported by: PsaltyDS Owned by: Jon
Milestone: 3.3.3.1 Component: AutoIt
Version: Severity: None
Keywords: Cc:

Description

Ref documentation change in BugTrac #681.

FileReadLine() uses a 64K buffer and returns each 64K portion of a longer line as a separate line. Request change to assemble complete line before returning, or in the alternative, return a flag in @error or @extended that indicates the entire line was not returned.

Demo:

Global $sFile = "test.txt", $hFile, $n
Global $sLine = "012345467890"
FileDelete($sFile)

; Create large line
Do
    $sLine &= $sLine
Until Stringlen($sLine) > 2^16
ConsoleWrite("Actual line length = " & StringLen($sLine) & @LF)

; Open file
$hFile = FileOpen($sFile, 2) ; Overwrite
For $n = 1 To 10
	; Write 10 lines
    FileWriteLine($hFile,$sLine)
Next
FileClose($hFile)

; Test with FileReadLine()
$n = 1 
While 1
	$sLine = FileReadLine($sFile, $n)
	If @error Then ExitLoop
	ConsoleWrite("Line " & $n & " length = " & StringLen($sLine) & @LF)
	$n += 1
WEnd

Attachments (0)

Change History (3)

comment:1 by TicketCleanup, 17 years ago

Version: 3.2.13.10

Automatic ticket cleanup.

comment:2 by J-Paul Mesnage, 17 years ago

Owner: set to Valik
Status: newassigned

comment:3 by Jon, 16 years ago

Milestone: 3.3.3.1
Owner: changed from Valik to Jon
Resolution: Completed
Status: assignedclosed

Added by revision [5514] in version: 3.3.3.1

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.