Javascript File isDirectory

From FreeSWITCH Wiki
Jump to: navigation, search

Contents

Description

Returns a boolean of whether the current file is a directory or not.

Synopsis

isDirectory

Example

var fd = new File("/tmp/blah");
if (fd.isDirectory) {
  console_log(fd.name) + "is a directory\n");
} else {
  console_log(fd.name) + "is not a directory\n");
}

See Also