From FreeSWITCH Wiki
Jump to: navigation, search

Opens a file handle


  • mode - a comma seperated list of the file modes
    • read - open for reading
    • write - open for writing
    • readWrite - open for reading and writing
    • append - add to the end of a file
    • create - create the file if it doesnt exist
    • replace - replace the contents with new ones (truncate)
    • autoflush - auto flush the buffer when writing


var fd = new File("/tmp/blah");"read,write,create");
// Read output from an application
var fd = new File("|ls /home");"read");
var result ="128");

See also