⚡ fonksiyon

read_to_end

fonksiyon read_to_end

Read all remaining bytes from current position until EOF.

Mevcut pozisyondan EOF'a kadar tüm byte'ları oku.

Parameters / Parametreler

  • file: The file handle / Dosya handle'ı

Returns / Dönüş Değeri

Returns all bytes from current position to end, or error. Mevcut pozisyondan sona kadar tüm byte'ları döner, veya hata.

Example / Örnek

değişken f = io.open("binary.dat", "Read")?
io.seek(f, 100, "Start")?  // Skip first 100 bytes
değişken rest = io.read_to_end(f)?  // Read remaining
yazdır("Read {rest.uzunluk} bytes")

Performance / Performans

O(n) where n=remaining file size. Allocates memory for entire content. O(n) burada n=kalan dosya boyutu. Tüm içerik için bellek ayırır.

📍 Kaynak Kodu

Satır 0