open

Opens the file in read or write mode.


            open ( [mode ] [, codepage ])
         

Parameters

mode

File opening mode. The mode can be one of several values:
  • "r" - Opens the file in read-only mode. This mode is the default mode.
  • "w" - Opens the file in write mode.
  • "a" - Opens the file in 'append' mode, the data written to the file is appended at the end.

codepage

The file encoding. The encoding may be one of the following values:
  • File.CODEPAGE_CURRENT - This is the default codepage.
  • File.CODEPAGE_OEM
  • File.CODEPAGE_MAC
  • File.CODEPAGE_THREAD
  • File.CODEPAGE_LATIN1
  • File.CODEPAGE_LATIN2
  • File.CODEPAGE_ISOLATIN1
  • File.CODEPAGE_ISOLATIN2
  • File.CODEPAGE_OEMLATIN1
  • File.CODEPAGE_OEMLATIN2
  • File.CODEPAGE_UTF7
  • File.CODEPAGE_UTF8
  • File.CODEPAGE_ISOLATIN9
  • File.CODEPAGE_OEMUS
  • File.CODEPAGE_SHIFTJIS
  • File.CODEPAGE_BIG5
  • File.CODEPAGE_CHINESE
  • File.CODEPAGE_EUCKOREAN
  • File.CODEPAGE_UTF16LE
  • File.CODEPAGE_UTF16BE

Return value

None.

Remarks

If the file cannot be opened, an exception is raised.

Features

Method of class: File

Available in:

  • Content management
  • Delivery properties
  • Typology rule
  • JSSP
  • SOAP Method
  • WebApp
  • Workflow