using System; using System.Collections.Generic; using System.Text; using System.Web; using Zhaizj.Framework.Web; namespace Zhaizj.Framework.IO { internal class LinuxPath : 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 ); } else { String str = path; if (path.ToLower().StartsWith( SystemInfo.ApplicationPath ) == false) str = strUtil.Join( SystemInfo.ApplicationPath, path ); return HttpContext.Current.Server.MapPath( path ); } } } }