示例#1
0
        public string _urlDir()
        {
            SettingSingleton settingSingleton_ = __singleton <SettingSingleton> ._instance();

            string result_ = Path.Combine(settingSingleton_._urlDirectory(), mSrcUrl);

            if (null != mDirName && @"" != mDirName)
            {
                result_ = Path.Combine(result_, mDirName);
            }
            if (null != mArchiveUrl && @"" != mArchiveUrl)
            {
                string temp_ = @"^arc^" + mArchiveUrl;
                result_ = Path.Combine(result_, temp_);
            }
            foreach (DirUrl i in mDirUrls)
            {
                string dirUrlPath_ = i._dirUrlPath();
                result_ = Path.Combine(result_, dirUrlPath_);
            }
            if (null != mFileUrl && @"" != mFileUrl)
            {
                string temp_ = @"^file^" + mFileUrl;
                result_ = Path.Combine(result_, temp_);
            }
            return(result_);
        }
示例#2
0
        public static string[] _rootUrls()
        {
            List <string>    result_           = new List <string>();
            SettingSingleton settingSingleton_ = __singleton <SettingSingleton> ._instance();

            string urlDirectory_ = settingSingleton_._urlDirectory();

            string[] dirUrls_ = Directory.GetDirectories(urlDirectory_);
            foreach (string i in dirUrls_)
            {
                int    index_   = i.LastIndexOf(@"\");
                string dirName_ = i.Substring(index_ + 1);
                if (dirName_.StartsWith(@"www."))
                {
                    string urlName_ = @"url://" + dirName_;
                    result_.Add(urlName_);
                }
            }
            return(result_.ToArray());
        }