Exemplo n.º 1
0
        public override ArcFile TryOpen(ArcView file)
        {
            if (!file.Name.HasExtension(".odn"))
            {
                return(null);
            }
            var reader = new OdnIndexReader(file);
            var dir    = reader.ReadIndex();

            if (null == dir)
            {
                return(null);
            }

            /*
             * var sys_ini = VFS.CombinePath (VFS.GetDirectoryName (file.Name), "system.ini");
             * if (VFS.FileExists (sys_ini))
             * {
             *  try
             *  {
             *      using (var ini = new IniReader (sys_ini))
             *      {
             *          var scheme = ini.ReadScheme();
             *          return new OdnArchive (file, this, dir, scheme);
             *      }
             *  }
             *  catch { }
             * }
             */
            return(new ArcFile(file, this, dir));
        }
Exemplo n.º 2
0
        public override ArcFile TryOpen(ArcView file)
        {
            if (!file.Name.HasAnyOfExtensions(RequiredExtensions))
            {
                return(null);
            }
            var reader = new OdnIndexReader(file);
            var dir    = reader.ReadIndex();

            if (null == dir)
            {
                return(null);
            }
            return(new ArcFile(file, this, dir));
        }