Quantcast
Channel: Adobe Community: Message List - FrameMaker Scripting
Viewing all articles
Browse latest Browse all 3715

Re: How to know if an object is a File or a Folder ?

$
0
0

Hi Jang,

 

This from Chapter 3 of the JavaScript Tools Guide:

 

There are several ways to distinguish between a File and a Folder object. For example:

if (f instanceof File) ...

if (typeof f.open == "undefined") ...// Folders do not open

File and Folder objects can be used anywhere that a path name is required, such as in properties and arguments for files and folders.

 

Rick


Viewing all articles
Browse latest Browse all 3715

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>