Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at https://viewsourceconf.org

Summary

Returns a boolean value indicating whether the given FileSpecObject is a file.

Method of

File object

Syntax

boolean isFile (FileSpecObject NativeFolderPath);

Parameters

The isFile method has the following parameter:

NativeFolderPath
A FileSpecObject representing the queried file object.

Returns

A boolean value indicating whether the FileSpecObject is a file or not.

Example

f = getFolder( "Program", "sample.txt" );
if ( File.isFile(f) ) // the object represents a file

Document Tags and Contributors

 Contributors to this page: Sheppy, ethertank, trevorh, Fredchat, Rod Whiteley
 Last updated by: Sheppy,