MDN may have intermittent access issues April 18 13:00 - April 19 01:00 UTC. See whistlepig.mozilla.org for all notifications.

mozilla

Revision 188080 of isFile

  • Revision slug: XPInstall_API_Reference/File_Object/Methods/isFile
  • Revision title: isFile
  • Revision id: 188080
  • Created:
  • Creator: Rod Whiteley
  • Is current revision? No
  • Comment

Revision Content

isFile

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

Revision Source

<p>
</p>
<h3 name="isFile"> isFile </h3>
<p>Returns a boolean value indicating whether the given FileSpecObject is a file.
</p>
<h4 name="Method_of"> Method of </h4>
<p><a href="en/XPInstall_API_Reference/File_Object">File</a> object
</p>
<h4 name="Syntax"> Syntax </h4>
<pre>boolean isFile (FileSpecObject NativeFolderPath);
</pre>
<h4 name="Parameters"> Parameters </h4>
<p>The <code>isFile</code> method has the following parameter:
</p>
<dl><dt><code>NativeFolderPath</code>
</dt><dd>A FileSpecObject representing the queried file object.
</dd></dl>
<h4 name="Returns"> Returns </h4>
<p>A boolean value indicating whether the FileSpecObject is a file or not.
</p>
<h4 name="Example"> Example </h4>
<pre>f = getFolder( "Program", "sample.txt" );
if ( File.isFile(f) ) // the object represents a file
</pre>
Revert to this revision