Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

ZipFile.WriteText

Writes a text into the zip archive.

Component Version macOS Windows Linux Server iOS SDK
Compression 3.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "ZipFile.WriteText"; text { ; Encoding } )   More

Parameters

Parameter Description Example Flags
text The text to write. "Hello World"
Encoding The text encoding for text parameter.
Default is native.
Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the FAQ.
UTF8 Optional

Result

Returns "OK" on success.

Description

Writes a text into the zip archive.
This is a way to easily add a text file to a zip archive.
Please use ZipFile.CreateFile first to create a new file before writing to it.

In version 5.0 of the plugin, the parameters are changed and we got an extra unused parameter between function name and text. This was corrected in 5.1pr3.

Examples

Creates a text file:

MBS( "ZipFile.CreateFile"; "test.txt"; $date )
MBS( "ZipFile.WriteText"; "Hello World" )

See also

Example Databases

Blog Entries

This function checks for a license.

Created 18th August 2014, last changed 30th June 2022


ZipFile.WriteHex - iOSApp.AddSwipeGestureRecognizer