国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

結合FSO操作和Aspjpeg組件寫的Class

2024-05-04 11:01:42
字體:
來源:轉載
供稿:網友
《結合FSO操作寫的一個Class》

尚在完善中,基本功能已具備.
也可作為初學者的教程


 程序代碼
<%
'***************************** CDS系統 FSO操作類 Beta1 *****************************
'調用方法: Set Obj=New FSOControl
'所有路徑必須為絕對路徑,請采用Server.MapPath方法轉換路徑后再定義變量
'------ FileRun ---------------------------------------
'
'必選參數:
'FilePath ------ 處理文件路徑
'
'可選參數:
'FileAllowType ------ 處理文件允許的類型,定義方法例: gif|jpg|png|txt
'FileNewDir ------ 文件處理后保存到的目錄
'FileNewName ------ 新文件名前綴,請不要添加后綴, 例: sample.txt 則為 sample
'CoverPr ------ 是否覆蓋已有的文件 0為否 1為是 默認為1
'deletePr ------ 是否刪除原文件 0為否 1為是 默認為1
'---------------------------------------------------------

'------ UpDir(path) 取path的父目錄
'path可為文件,也可為目錄

'------ GetPrefixName(path) 取文件名前綴
'path必須為文件,可為完整路徑,也可是單獨文件名

'------ GetFileName(path) 取文件名
'path必須為文件,可為完整路徑,也可是單獨文件名

'------ GetExtensionName(path) 取文件名后綴,不包含"."
'path必須為文件,可為完整路徑,也可是單獨文件名

'------ FileIs(path) path是否為一文件
'如為,返回 true 否則返回 false
'------ FolderCreat(Path)
'------ Folderdelete(Path,FileIF)
'------ FileCopy(Path_From,Path_To,CoverIF)
'------ FileMove(Path_From,Path_To,CoverIF)
'------ Filedelete(Path)
'------ Filerename(OldName,NewName,CoverIf)

Class FSOControl

Dim FSO
Private File_Path,File_AllowType,File_NewFolder_Path,File_NewName,File_CoverIf,File_deleteIf
Public Property Let FilePath(StrType)
File_Path=StrType
End Property
Public Property Let FileAllowType(StrType)
File_AllowType=StrType
End Property
Public Property Let FileNewDir(StrType)
File_NewFolder_Path=StrType
End Property
Public Property Let FileNewName(StrType)
File_NewName=StrType
End Property
Public Property Let CoverPr(LngSize)
If isNumeric(LngSize) then
File_CoverIf=Clng(LngSize)
End If
End Property
Public Property Let deletePr(LngSize)
If isNumeric(LngSize) then
File_deleteIf=Clng(LngSize)
End If
End Property

Private Sub Class_Initialize()
Set FSO=createObject("Scripting.FileSystemObject") 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 同仁县| 河东区| 河北省| 香港 | 新邵县| 怀远县| 长春市| 五峰| 龙山县| 定南县| 隆昌县| 苍南县| 耒阳市| 西乌珠穆沁旗| 云梦县| 姚安县| 民丰县| 三穗县| 稻城县| 珠海市| 沁源县| 仪陇县| 张家港市| 巴青县| 滨州市| 扬中市| 德昌县| 桃园县| 高密市| 福泉市| 临城县| 东乌珠穆沁旗| 吴桥县| 九龙城区| 隆尧县| 海原县| 泰和县| 宕昌县| 周口市| 辽宁省| 萨嘎县|