FileRead()
Reads an on-disk or in-memory text file or a file object created with the FileOpen function.
FileRead( file=any, charsetOrBufferSize=any );
Returns: any
| Argument | Description |
|---|---|
|
file
any,
required
|
edit
file path or object |
|
charsetOrBufferSize
any,
optional
|
edit
the charset used or the size of the buffer. |
Examples
edit fileRead("/path/to/file.ext");
Related System Properties / Environment Variables
- LUCEE_RESOURCE_CHARSET - Default character set for reading from/writing to various resources (files)
Type: string, Default: system charset
See also
- File handling
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)