mozilla

Revision 324375 of isFile

  • Revision slug: XPInstall_API_Reference/File_Object/Methods/isFile
  • Revision title: isFile
  • Revision id: 324375
  • Created:
  • Creator: trevorh
  • Is current revision? No
  • Comment Remove language

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

<h3 id="isFile" name="isFile">isFile</h3>
<p>Returns a boolean value indicating whether the given FileSpecObject is a file.</p>
<h4 id="Method_of" name="Method_of">Method of</h4>
<p><a href="en/XPInstall_API_Reference/File_Object">File</a> object</p>
<h4 id="Syntax" name="Syntax">Syntax</h4>
<pre>
boolean isFile (FileSpecObject NativeFolderPath);
</pre>
<h4 id="Parameters" 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 id="Returns" name="Returns">Returns</h4>
<p>A boolean value indicating whether the FileSpecObject is a file or not.</p>
<h4 id="Example" name="Example">Example</h4>
<pre>
f = getFolder( "Program", "sample.txt" );
if ( File.isFile(f) ) // the object represents a file
</pre>
Revert to this revision