Difference between revisions of "NXSL:OpenFile"

(Created page with "__NOTOC__ Open file on server local file system. Must be enabled by setting server configuration parameter ''NXSL.EnableFileIOFunctions''. '''Since:''' 2.2.3 == Syntax ==...")
 
m (Text replacement - "^" to "{{deprecated}}")
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
__NOTOC__
{{deprecated}}__NOTOC__
Open file on server local file system. Must be enabled by setting server configuration parameter ''NXSL.EnableFileIOFunctions''.
Open file on server local file system. Must be enabled by setting server configuration parameter ''NXSL.EnableFileIOFunctions''.


'''Since:''' 2.2.3
'''Since:''' 2.2.3


== Syntax ==
== Syntax ==


OpenFile(''name'', ''mode'');
OpenFile(''name'', ''mode'');


== Parameters ==
== Parameters ==
Line 14: Line 12:
:{|
:{|
|-
|-
| ''name'' || string || File name.
| ''name'' || File name.
|-
|-
| ''mode'' || string || Optional access mode: "r" for read, "w" for write (will overwrite existing file), "a" for append. If omitted, file will be open for reading.
| ''mode'' || Optional access mode: "r" for read, "w" for write (will overwrite existing file), "a" for append. If omitted, file will be open for reading.
|}
|}


== Return Value ==
== Return Value ==


[[NXSL:FILE|FILE]] object on success, NULL on failure.
[[NXSL:FILE|FILE]] object on success, NULL on failure.

Latest revision as of 18:13, 13 September 2022

This Wiki is deprecated and we are are currrently migrating remaining pages into product documentation (Admin Guide, NXSL Guide)

Open file on server local file system. Must be enabled by setting server configuration parameter NXSL.EnableFileIOFunctions.

Since: 2.2.3

Syntax

OpenFile(name, mode);

Parameters

name File name.
mode Optional access mode: "r" for read, "w" for write (will overwrite existing file), "a" for append. If omitted, file will be open for reading.

Return Value

FILE object on success, NULL on failure.