Adobe 38040334 API Reference - Page 13
DWfile.getAttributes
![]() |
UPC - 883919090467
View all Adobe 38040334 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 13 highlights
DREAMWEAVER CS3 8 API Reference Description This function tests for the existence of the specified file. Arguments fileURL • The fileURL argument, which is expressed as a file:// URL, is the requested file. Returns A Boolean value: true if the file exists; false otherwise. Example The following code checks for the mydata.txt file and displays an alert message that tells the user whether the file exists: var fileURL = "file:///c|/temp/mydata.txt"; if (DWfile.exists(fileURL)){ alert(fileURL + " exists!"); }else{ alert(fileURL + " does not exist."); } DWfile.getAttributes() Availability Dreamweaver 2. Description This function gets the attributes of the specified file or folder. Arguments fileURL • The fileURL argument, which is expressed as a file:// URL, is the file or folder for which you want to get attributes. Returns A string that represents the attributes of the specified file or folder. If the file or folder does not exist, this function returns a null value. The following characters in the string represent the attributes: • R is read only. • D is folder. • H is hidden. • S is system file or folder. Example The following code gets the attributes of the mydata.txt file and displays an alert box if the file is read only:
![](/manual_guide/products/adobe-38040334-api-reference-b593776/13.png)