Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4    Statistic    FMM    Blog  


Reads a text file from a file.

Component Version macOS Windows Linux Server iOS SDK
RichText 3.0 ✅ Yes ❌ No ❌ No ✅ Yes, on macOS ✅ Yes
MBS( "RichText.ReadFile"; Path )   More


Parameter Description Example
Path The native file path to the file. $path


Returns OK or error message.


Reads a text file from a file.
The plugin uses Mac system functions to read text files including plain text files, RTF files, Word files in doc or xml format, webkit archives or OpenOffice documents.
If you want the user to select a path, please use FileDialog functions.

See also Files.ReadJPEG, Files.ReadPDF, Files.ReadPNG, Text.ReadTextFile and Files.ReadFile.

Warning: The plugin can only read/write the styles/formats which Apple supports for their cocoa framework.

This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.


Read formatted text from container field:

$r = MBS( "RichText.ReadFile"; "/Users/Desktop/test.txt" )
$text = MBS( "RichText.FormattedText" )

See also

Example Databases

Created 18th August 2014, last changed 14th August 2017

RichText.ReadContainer - RichText.ReadHTML

Feedback: Report problem or ask question.

MBS Xojo Plugins

Start Chat