Dreamweaver 3.
This function deletes the specified file.
fileURL
fileURL argument, which is expressed as a file:// URL, is the file you want to remove.
A Boolean value: true value if the operation succeeds; false otherwise.
The following example uses the DWfile.getAttributes() function to determine whether the file is read-only and the confirm() function to display a Yes/No dialog box to the user:
function deleteFile(){
var delAnyway = false;
var selIndex = document.theForm.menu.selectedIndex;
var selFile = document.theForm.menu.options[selIndex].value;
if (DWfile.getAttributes(selFile).indexOf('R') != -1){
delAnyway = confirm('This file is read-only. Delete anyway?');
if (delAnyway){
DWfile.remove(selFile);
}
}
}
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/dreamweaver/8/apiref/02_fil15.htm