⚡ fonksiyon

sync_data

fonksiyon sync_data

Sync file data to disk without metadata (fdatasync).

Metadata olmadan dosya verisini diske senkronize et (fdatasync).

Parameters / Parametreler

  • file: The file handle / Dosya handle'ı

Returns / Dönüş Değeri

Returns Ok(empty) when data is on disk, or error. Veri diskte olduğunda Tamam(boş) döner, veya hata.

Example / Örnek

değişken f = io.open("log.txt", "Append")?
io.write_string(f, "log entry")?
io.sync_data(f)?  // Faster than sync() - skips metadata

Performance / Performans

Faster than sync() - doesn't update access times. Good for logs. sync()'den daha hızlı - erişim zamanlarını güncellemez. Loglar için iyi.

📍 Kaynak Kodu

Satır 0