mozilla

Revision 188081 of isFile

  • Revision slug: XPInstall_API_Reference/File_Object/Methods/isFile
  • Revision title: isFile
  • Revision id: 188081
  • Created:
  • Creator: Fredchat
  • Is current revision? No
  • Comment adding fr

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
{{ languages( { "fr": "fr/R\u00e9f\u00e9rence_de_l\'API_XPInstall/Objet_File/M\u00e9thodes/isFile" } ) }}

Revision Source

<p>
</p>
<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>
{{ languages( { "fr": "fr/R\u00e9f\u00e9rence_de_l\'API_XPInstall/Objet_File/M\u00e9thodes/isFile" } ) }}
Revert to this revision