Skip to content
Snippets Groups Projects
Commit ca0a0b0d authored by rswindell's avatar rswindell
Browse files

Added notes in documentation for File.open() regarding modifying .ini files

(file must be opened for reading and writing) and using file_exists() to a
open new or existing file for both reading and writing.
parent dcfb2b7e
No related branches found
No related tags found
No related merge requests found
...@@ -1581,6 +1581,11 @@ static jsSyncMethodSpec js_file_functions[] = { ...@@ -1581,6 +1581,11 @@ static jsSyncMethodSpec js_file_functions[] = {
"<tt>a+</tt> open for reading and appending<br>" "<tt>a+</tt> open for reading and appending<br>"
"<tt>b&nbsp</tt> open in binary (untranslated) mode; translations involving carriage-return and linefeed characters are suppressed (e.g. <tt>r+b</tt>)<br>" "<tt>b&nbsp</tt> open in binary (untranslated) mode; translations involving carriage-return and linefeed characters are suppressed (e.g. <tt>r+b</tt>)<br>"
"<tt>e&nbsp</tt> open a <i>non-shareable</i> file (that must not already exist) for <i>exclusive</i> access <i>(introduced in v3.12)</i><br>" "<tt>e&nbsp</tt> open a <i>non-shareable</i> file (that must not already exist) for <i>exclusive</i> access <i>(introduced in v3.12)</i><br>"
"<br><b>Note:</b> When using the <tt>iniSet</tt> methods to modify a <tt>.ini</tt> file, "
"the file must be opened for both reading and writing.<br>"
"<br><b>Note:</b> To open an existing or create a new file for both reading and writing, "
"use the <i>file_exists</i> function like so:<br>"
"<tt>file.open(file_exists(file.name) ? 'r+':'w+');</tt>"
) )
,310 ,310
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment