FlushIni

Description:

baFlushIni forces Windows to write an ini file to disk.

Platforms:

Windows

Usage:

baFlushIni( Filename )

Arguments:

String.
Filename is the name of the ini file to flush.

Returns:

Void.

Examples:

Director:
baFlushIni( the moviePath & "data.ini" )

Authorware:
baFlushIni( FileLocation ^ "data.ini" )
 

Notes:

This function is for use with the other ini file functions. When Windows writes an ini file it keeps it cached for a short time. This does not cause problems when using only the ini functions. However, if you want to write an ini file, then immediately do something else with it, say, encrypt it, then you should use this function to force Windows to write the file to disk before you use it.

eg.

baWriteIni( "data", "password", pw, iniFile ) -- write ini file
baFlushIni( iniFile ) -- force it to disk
baEncryptFile( iniFile, key ) -- encrypt it

This function is not needed if you are only using baWriteIni and baReadIni on your ini files.
 

See also:

baReadIni
baWriteIni
baDeleteIniEntry
baDeleteIniSection