FileIO

From FreeSWITCH Wiki
Jump to: navigation, search

Contents

Description

The FileIO object lets you manipulate files.

Synopsis

FileIO(filename,flags)

  • name - the filename including path to open
  • flags are one of
    • r - read
    • w - write
    • c - create
    • a - append
    • t - truncate
    • b - binary

Note: if the file does not exist and the 'c' flag is not set the JS script will abort and an error event will be generated saying it cant open the file.

Example

fd = new FileIO(argv[[0], "r");

Methods

Properties