⚡ fonksiyon
unlock
fonksiyon unlock
Unlock a previously locked file.
Önceden kilitlenmiş dosyanın kilidini aç.
Parameters / Parametreler
file: The locked file handle / Kilitli 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("locked.txt", "Write")?
io.lock(f, "Exclusive")?
io.write_string(f, "protected data")?
io.unlock(f)? // CRITICAL: Always unlock!
io.close(f)?
Performance / Performans
O(1) - Releases file lock immediately. O(1) - Dosya kilidini hemen serbest bırakır.