Meet us at at Real World in Orlando, Florida.

All functions   Mac OS X   Windows   Crossplatform   Components   Guides  
New in version: 2.0   2.1   2.2   2.3   2.4   2.5   2.6   2.7   2.8  

String.ReadTextFile

Component: String
Version: 2.4
Mac OS X: Works
Windows: Works

MBS( "String.ReadTextFile"; FilePath; Encoding )

Parameters

Parameter Description Example value
FilePath The native file path. Something like "/Users/cs/desktop/test.txt" on Mac and "C:\Programs\Data\test.txt" on Windows. Files without path end in the root directory on Mac. "test.txt"
Encoding Optional. Default is native. Can be one of the following strings: ansi, windows, mac, latin1, utf8. UTF8

Result

Returns text on success.

Description

Reads a text file.
You have to decide which encoding to use (if not native). We support a few encodings, but we can add more if you need something special.

Examples

Read system.log file:

MBS("String.ReadTextFile"; "/var/log/system.log"; "utf8")

Feedback: Report problem or ask question.




Links
MBS Realbasic PDF Plugins - Pfarrgemeinde Ministranten Nickenich