'원래 VB로 작성하여 ASP 사용을 위해 DLL로 캡슐화하고 나중에 VB.NET로 업그레이드했습니다.
'이것은 내가 전에 쓴 영화 사이트의 일부입니다. 이 프로그램은 매우 간단하며 의견이 없습니다. 모두가 그것을 처리 할 수 있습니다.
'Programbysomeeyes
'importssystem.io 네임 스페이스를 선언 할 수 있습니다
PublicFunctionMyFileExists (ByValpathnameasstring) Asstring'Check 파일이 존재하는지 확인하십시오
iffile.exists (pathname) = falsethen
myFileExists = "<fontColor =" "Red" "> 파일 lost </font>"
또 다른
myFileExists = "<fontColor =" "#0066ff" "> 파일이 존재합니다 </font>" "
endif
최종 기능 장애
PrivatesUbmyCreatDirectory (ByValpathnameasstring) '폴더 작성
노력하다
ifdirectory.exists (pathname) = falsethen
directory.createdirectory (pathname)
endif
catcheasexception
myerrmsg = myerrmsg & "작성"& pathname & "폴더를 만들 때 예기치 않은 오류가 발생했습니다."
myerrmsg = myerrmsg & e.tostring
httpcontext.current.response.write ( "프로그램에 예기치 않은 오류가 발생했습니다. 자세한 내용은 로그 파일을 확인하십시오! <br>").
엔 트리
Endsub
PrivatesUbmyDelDirectory (ByValPathNameasString) '폴더 삭제
노력하다
ifdirectory.exists (pathname) = truethen
directory.delete (pathname)
endif
catcheasexception
myerrmsg = myerrrmsg = myerrmsg & "폴더"일 때 예기치 않은 오류가 발생했습니다.