Ιδιότητα Type του ASP
Ορισμός και χρήση
Η ιδιότητα Type χρησιμοποιείται για να επιστρέψει τον τύπο του καθορισμένου αρχείου ή φακέλου.
Γραμματική:
FileObject.Type FolderObject.Type
Παράδειγμα για το αντικείμενο File
<% dim fs,f set fs=Server.CreateObject("Scripting.FileSystemObject") set f=fs.GetFile("c:help.txt") Response.Write("Το αρχείο test.txt είναι τύπου:") Response.Write("}}")f.Type) set f=nothing set fs=nothing %>
Output:
Το αρχείο help.txt είναι τύπου: Έγγραφο κειμένου
Παράδειγμα για το αντικείμενο Folder
<% dim fs,f set fs=Server.CreateObject("Scripting.FileSystemObject") set f=fs.GetFile("c:help.asp") Response.Write("Το αρχείο test.asp είναι τύπου:") Response.Write("}}")f.Type) set f=nothing set fs=nothing %>
Output:
The file help.asp is of type: Active Server Document