⚡ fonksiyon

rewind

fonksiyon rewind

Rewind file to the beginning (position 0).

Dosyayı başa sar (pozisyon 0).

Parameters / Parametreler

  • file: The file handle / Dosya handle'ı

Returns / Dönüş Değeri

Returns Ok(empty) on success, or error. Başarıda Tamam(boş) döner, veya hata.

Example / Örnek

değişken f = io.open("data.txt", "Read")?
io.read_line(f)?  // Read first line
io.rewind(f)?     // Go back to start
io.read_line(f)?  // Read first line again

Performance / Performans

O(1) - Simple wrapper around seek(0, "Start"). O(1) - seek(0, "Start") için basit wrapper.

📍 Kaynak Kodu

Satır 0