⚡ fonksiyon
tell
fonksiyon tell
Get the current position in the file.
Dosyadaki mevcut pozisyonu al.
Parameters / Parametreler
file: The file handle / Dosya handle'ı
Returns / Dönüş Değeri
Returns current byte position from start, or error. Başlangıçtan itibaren mevcut byte pozisyonunu döner, veya hata.
Example / Örnek
değişken f = io.open("log.txt", "Read")?
io.read_string(f, 50)? // Read 50 bytes
değişken pos = io.tell(f)? // pos = 50
yazdır("Current position: {pos}")
Performance / Performans
O(1) - Simple file pointer query. O(1) - Basit dosya pointer sorgusu.