# File:Read

- **Ortam:** İstemci, Sunucu, Menü
- **İngilizce aslı:** https://wiki.facepunch.com/gmod/File:Read
- **Çeviri tarihi:** 2026-04-23

```lua
string File:Read( number length = nil )
```

## Açıklama

Belirtilen karakter sayısını okur ve onları ikili dize olarak gönderir.

## Argümanlar

1.. [numara](https://gmod.tr/wiki/number) **uzunluk** = hiç: Belirtilen karakter sayısını okur. Eğer ayarlanmazsa, tüm dosyayı okuyacaktır.

## Geri dönüşler

1.. [dizgin](https://gmod.tr/wiki/string) **veriler**: Okuyucu verileri.

### Örnek

Genişlemelerden uyarlanmış/file.lua

```lua
function file.Read( filename, path )

	if ( path == true ) then path = "GAME" end
	if ( path == nil || path == false ) then path = "DATA" end

	local f = file.Open( filename, "rb", path )
	if ( !f ) then return end

	local str = f:Read( f:Size() )

	f:Close()

	if ( !str ) then str = "" end
	return str

end
```

- [GMod Wiki ana sayfası](https://gmod.tr/wiki)

---

[Tüm sunucular](https://gmod.tr/) · [GmodTR Launcher](https://gmod.tr/launcher) · [Rehber](https://gmod.tr/rehber) · [GMod Wiki](https://gmod.tr/wiki) · [GmodTR nedir?](https://gmod.tr/hakkinda) · [Sunucu ekle](https://gmod.tr/sunucu-ekle) · [Discord](https://discord.gg/gmodtr)

Kaynak: https://gmod.tr/wiki/File:Read
