コード例 #1
0
ファイル: ArchiveManager.cs プロジェクト: nistck/Jx
 private void a(string path, ArchiveManager.ClassA a, string text, SearchOption searchOption, List <string> list)
 {
     if (a.Directories != null)
     {
         if (searchOption == SearchOption.AllDirectories)
         {
             foreach (ArchiveManager.ClassA current in a.Directories.Values)
             {
                 string text2 = Path.Combine(path, current.Name);
                 this.a(text2, current, text, searchOption, list);
             }
         }
         foreach (ArchiveManager.ClassA current2 in a.Directories.Values)
         {
             if (!current2.RealFileSystemDirectory)
             {
                 string name = current2.Name;
                 if (this.A(name, text))
                 {
                     string item = Path.Combine(path, name);
                     list.Add(item);
                 }
             }
         }
     }
 }
コード例 #2
0
ファイル: ArchiveManager.cs プロジェクト: nistck/Jx
 internal void a(string text, string text2, SearchOption searchOption, List <string> list)
 {
     ArchiveManager.ClassA a = this.A(text, false);
     if (a != null)
     {
         this.a(text, a, text2, searchOption, list);
     }
 }
コード例 #3
0
ファイル: ArchiveManager.cs プロジェクト: nistck/Jx
 private void D()
 {
     this.t = null;
     foreach (Archive current in this.s.Values)
     {
         current.Dispose();
     }
     this.s.Clear();
     foreach (ArchiveFactory current2 in this.S)
     {
         current2.Dispose();
     }
     this.S.Clear();
 }
コード例 #4
0
ファイル: ArchiveManager.cs プロジェクト: nistck/Jx
        private ArchiveManager.ClassA A(string text, bool flag)
        {
            string[] array = text.Split(new char[]
            {
                '\\',
                '/'
            }, StringSplitOptions.RemoveEmptyEntries);
            string text2 = "";

            ArchiveManager.ClassA a = this.t;
            string[] array2         = array;
            for (int i = 0; i < array2.Length; i++)
            {
                string text3 = array2[i];
                text2 = Path.Combine(text2, text3);
                ArchiveManager.ClassA a2 = null;
                string key = text3.ToLower();
                if (a.Directories != null)
                {
                    a.Directories.TryGetValue(key, out a2);
                }
                if (a2 == null)
                {
                    if (!flag)
                    {
                        return(null);
                    }
                    string path = Path.Combine(VirtualFileSystem.ResourceDirectoryPath, text2);
                    bool   realFileSystemDirectory = Directory.Exists(path);
                    a2 = new ArchiveManager.ClassA(text3, realFileSystemDirectory);
                    if (a.aT == null)
                    {
                        a.aT = new Dictionary <string, ArchiveManager.ClassA>();
                    }
                    a.aT.Add(key, a2);
                }
                a = a2;
            }
            return(a);
        }
コード例 #5
0
ファイル: ArchiveManager.cs プロジェクト: nistck/Jx
 private void A(string path, ArchiveManager.ClassA a, string text, SearchOption searchOption, List <string> list)
 {
     if (searchOption == SearchOption.AllDirectories && a.Directories != null)
     {
         foreach (ArchiveManager.ClassA current in a.Directories.Values)
         {
             string text2 = Path.Combine(path, current.Name);
             this.A(text2, current, text, searchOption, list);
         }
     }
     if (a.Files != null)
     {
         for (int i = 0; i < a.Files.Count; i++)
         {
             string text3 = a.Files[i];
             if (this.A(text3, text))
             {
                 string item = Path.Combine(path, text3);
                 list.Add(item);
             }
         }
     }
 }
コード例 #6
0
ファイル: ArchiveManager.cs プロジェクト: nistck/Jx
 internal bool A(string text)
 {
     ArchiveManager.ClassA a = this.A(text, false);
     return(a != null && !a.RealFileSystemDirectory);
 }
コード例 #7
0
ファイル: ArchiveManager.cs プロジェクト: nistck/Jx
        private bool c()
        {
            this.t = new ArchiveManager.ClassA(null, true);
            List <ArchiveManager.ClassB> list = this.C();

            foreach (ArchiveManager.ClassB current in list)
            {
                Archive archive = current.Factory.OnLoadArchive(current.SourceRealFileName);
                if (archive == null)
                {
                    return(false);
                }
                string key = VirtualFileSystem.NormalizePath(current.SourceRealFileName).ToLower();
                this.s.Add(key, archive);
                string   virtualPathByReal = VirtualFileSystem.GetVirtualPathByReal(Path.GetDirectoryName(archive.FileName));
                string[] array;
                Archive.GetListFileInfo[] array2;
                archive.OnGetDirectoryAndFileList(out array, out array2);
                string[] array3 = array;
                for (int i = 0; i < array3.Length; i++)
                {
                    string text = array3[i];
                    string path = text.Trim(new char[]
                    {
                        '\\',
                        '/'
                    });
                    string text2 = Path.Combine(virtualPathByReal, path);
                    this.A(text2, true);
                }
                Archive.GetListFileInfo[] array4 = array2;
                for (int j = 0; j < array4.Length; j++)
                {
                    Archive.GetListFileInfo getListFileInfo = array4[j];
                    string text3         = VirtualFileSystem.NormalizePath(getListFileInfo.FileName);
                    string directoryName = Path.GetDirectoryName(text3);
                    string path2         = directoryName.Trim(new char[]
                    {
                        '\\',
                        '/'
                    });
                    string text4 = Path.Combine(virtualPathByReal, path2);
                    this.A(text4, true);
                    string text5            = Path.Combine(virtualPathByReal, text3);
                    ArchiveManager.ClassA a = this.A(Path.GetDirectoryName(text5), false);
                    if (a.@as == null)
                    {
                        a.@as = new List <string>();
                    }
                    [email protected](Path.GetFileName(text5));
                    string key2 = text5.ToLower();
                    ArchiveManager.FileInfo fileInfo;
                    if (this.T.TryGetValue(key2, out fileInfo))
                    {
                        this.T.Remove(key2);
                    }
                    ArchiveManager.FileInfo value = new ArchiveManager.FileInfo(text5, archive, getListFileInfo.FileName, getListFileInfo.Length);
                    this.T.Add(key2, value);
                }
            }
            return(true);
        }