File.exists

From FreeSWITCH Wiki
Jump to: navigation, search

Contents

Description

Returns a boolean whether the file exists or not.

Synopsis

exists

Example

var fd = new File("/tmp/blah");
if (fd.exists) {
  console_log((fd.name) + "exists\n");
} else {
  console_log((fd.name) + "does not exist\n");
}

See also