Javascript File canReplace

From FreeSWITCH Wiki
Jump to: navigation, search

Contents

Description

A boolean whether or not we can replace the contents in this file.

Synopsis

canReplace

Example

var fd = new File("/tmp/blah");
fd.open("read,write,replace");
if (fd.canReplace) {
  console_log(fd.name) + "can be overwritten\n");
} else {
  console_log(fd.name) + "cannot be overwritten\n");
}

See Also