Adobe Dreamweaver API Reference CS5 Manuale Utente Pagina 12

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 533
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 11
7
DREAMWEAVER API REFERENCE
The file I/O API
Last updated 8/27/2013
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:
var fileURL = "file:///c|/temp/mydata.txt";
var str = DWfile.getAttributes(fileURL);
if (str && (str.indexOf("R") != -1)){
alert(fileURL + " is read only!");
}
DWfile.getModificationDate()
Availability
Dreamweaver 2.
Description
This function gets the time when the file was last modified.
Vedere la pagina 11
1 2 ... 7 8 9 10 11 12 13 14 15 16 17 ... 532 533

Commenti su questo manuale

Nessun commento