自己写的文件操作的function和Sub vb.net dll(2)
myErrMsg = myErrMsg & e.ToString
HttpContext.Current.Response.Write("程序遇到一个意外的错误,详细情况请查看日志文件!<br>")
End Try
End Sub
Private Sub myMoveFile(ByVal pathName As String, ByVal target As String) '移动文件夹
Try
File.Move(pathName, target)
Catch e As Exception
myErrMsg = myErrMsg & "从" & pathName & "移动文件到" & target & "的时候出现一个意外的错误."
myErrMsg = myErrMsg & e.ToString
HttpContext.Current.Response.Write("程序遇到一个意外的错误,详细情况请查看日志文件!<br>")
End Try
End Sub
Private Sub myCopyFile(ByVal fsource As String, ByVal fdestination As String)
Try
File.Copy(fsource, fdestination, False)
Catch e As Exception
myErrMsg = myErrMsg & "从" & fsource & "复制文件到" & fdestination & "的时候出现一个意外的错误."
myErrMsg = myErrMsg & e.ToString
HttpContext.Current.Response.Write("程序遇到一个意外的错误,详细情况请查看日志文件!<br>")
End Try
End Sub
内容版权声明:除非注明,否则皆为本站原创文章。