CopyCode The Code is as follows: <%
'================================================ ======================================
'= System Version: 1.0 =
'= File version: 1.0 =
'= Text creation date: 2005-10-31 =
'================================================ ======================================
Class cls_io
Private FileSystemObject
Private sub class_terminate ()
If isobject (FileSystemObject) then
Set FileSystemObject = nothing
End if
End sub
'// Create a FileSystemObject object
Public Function init_object ()
On Error resume next
If not isobject (FileSystemObject) then
Set FileSystemObject = server. Createobject ("scripting. FileSystemObject ")
If err. Number <> 0 then
Init_object = false
Err. Clear
Exit Function
Else
Init_object = true
End if
End if
End Function
Public sub deletefile (byval Str)
On Error resume next
Call FileSystemObject. deletefile (server. mappath ("../uploadfile/" & Str ))
End sub
Public Function isfolder (byval Str)
Isfolder = FileSystemObject. folderexists (STR)
End Function
Public Function showfolder (byval Str)
Dim obj_folder, obj_file
Set obj_folder = FileSystemObject. getfolder (server. mappath (STR ))
Set showfolder = obj_folder.files
Set obj_folder = nothing
End Function
End Class
%>