Beispiel #1
0
        public void SaveToDir(String DirName)
        {
            V8File f = First;

            DirectoryInfo di = new DirectoryInfo(DirName);

            di.Create();

            if (!DirName.EndsWith("\\"))
            {
                DirName += '\\';
            }

            while (f != null)
            {
                if (f.IsCatalog())
                {
                    f.GetCatalog().SaveToDir(DirName + f.Name);
                }
                else
                {
                    f.SaveToFile(DirName + f.Name);
                }
                f.Close();
                f = f.Next;
            }
        }
Beispiel #2
0
        public V8Catalog CreateCatalog(String FileName, bool _selfzipped = false)
        {
            V8Catalog ret;

            V8File f = CreateFile(FileName, _selfzipped);

            if (f.GetFileLength() > 0)
            {
                if (f.IsCatalog())
                {
                    ret = f.GetCatalog();
                }
                else
                {
                    ret = null;
                }
            }
            else
            {
                f.Write(Encoding.UTF8.GetBytes(_EMPTY_CATALOG_TEMPLATE), CATALOG_HEADER_LEN2);
                ret = f.GetCatalog();
            }

            return(ret);
        }