⚡ fonksiyon
exists
fonksiyon exists
Check if a file or directory exists.
Bir dosya veya dizinin var olup olmadığını kontrol et.
Parameters / Parametreler
path: Path to check / Kontrol edilecek yol
Returns / Dönüş Değeri
Returns true if path exists (file or directory), false otherwise. Yol varsa (dosya veya dizin) true, yoksa false döner.
Example / Örnek
eğer io.exists("config.json") yap
değişken config = io.read_to_string("config.json")?
yoksa yap
yazdır("Config file not found")
son
Performance / Performans
O(1) - Simple stat check, no file opening. O(1) - Basit stat kontrolü, dosya açma yok.