init lserp cs 5.0
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using Zhaizj.Framework.Web;
|
||||
|
||||
namespace Zhaizj.Framework.IO {
|
||||
|
||||
internal class WindowsPath : PathTool {
|
||||
|
||||
public override String CombineAbs( String[] arrPath ) {
|
||||
|
||||
if (arrPath.Length == 0) return "";
|
||||
|
||||
String result = arrPath[0];
|
||||
for (int i = 1; i < arrPath.Length; i++) {
|
||||
if (strUtil.IsNullOrEmpty( arrPath[i] )) continue;
|
||||
result = strUtil.Join( result, arrPath[i].Replace( "/", "\\" ), "\\" );
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
public override String Map( String path ) {
|
||||
|
||||
if (strUtil.IsNullOrEmpty( path )) return "";
|
||||
|
||||
if (SystemInfo.IsWeb == false) {
|
||||
|
||||
return strUtil.Join( AppDomain.CurrentDomain.BaseDirectory, path.Replace( "/", "\\" ), "\\" );
|
||||
}
|
||||
else {
|
||||
|
||||
String str = path;
|
||||
if (path.ToLower().StartsWith( SystemInfo.ApplicationPath ) == false)
|
||||
str = strUtil.Join( SystemInfo.ApplicationPath, path );
|
||||
|
||||
return HttpContext.Current.Server.MapPath( str );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user