> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# readfile

> workspace icindeki existing regular file degerini binary mode ile okur ve bytes degerlerini Lua string olarak dondurur.

<div className="real-function-page">
  ```lua theme={null}
  readfile(path: string): string
  ```

  ## Aliaslar

  * `readfileasync`

  ## Argümanlar

  <ParamField path={"path"} type={"string"} required>
    separator normalization, workspace-boundary checks ve filename/extension checks sonrasinda workspace icinde cozulun File path. Absolute paths yalnizca workspace icinde resolve olursa kabul edilir.
  </ParamField>

  ## Dönüşler

  <ResponseField name={"content"} type={"string"}>
    File contents acik uzunluklu Lua string olarak dondurulur. null bytes, line endings ve BOM bytes gibi bytes degerleri readfile tarafindan transform edilmez.
  </ResponseField>

  ## Örnek

  existing workspace file icinden bytes oku.

  ```lua theme={null}
  local path = "examples/config.json"
  writefile(path, '{"enabled":true}')

  local content = readfile(path)
  print(content)
  print(#content)
  ```
</div>
