mozilla

Revision 324783 of isFile

  • Revision slug: XPInstall_API_Reference/File_Object/Methods/isFile
  • Revision title: isFile
  • Revision id: 324783
  • Created:
  • Creator: ethertank
  • Is current revision? No
  • Comment Broken Links

Revision Content

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

Revision Source

<h2 id="Summary" name="Summary">Summary</h2>

<p>Returns a boolean value indicating whether the given FileSpecObject is a file.</p>


<h2 id="Method_of" name="Method_of">Method of</h2>
<p><a href="/en-US/docs/XPInstall_API_Reference/File_Object">File</a> object</p>


<h2 id="Syntax" name="Syntax">Syntax</h2>

<pre class="syntaxbox">
boolean isFile (FileSpecObject NativeFolderPath);
</pre>


<h3 id="Parameters" name="Parameters">Parameters</h3>

<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>


<h3 id="Returns" name="Returns">Returns</h3>
<p>A boolean value indicating whether the FileSpecObject is a file or not.</p>


<h2 id="Example" name="Example">Example</h2>


<pre>f = getFolder( "Program", "sample.txt" );
if ( File.isFile(f) ) // the object represents a file</pre>
Revert to this revision