コード例 #1
0
        public IFileSysPackerStrategy GetFileTable(string tableName)
        {
            if (string.IsNullOrEmpty(tableName))
            {
                throw new ArgumentNullException(tableName);
            }
            if (!IsTableExists(tableName))
            {
                return(null);
            }
            DiskReadZip_ConnectInfo m_Conn = CheckConnection(tableName);

            IFileSysPackerStrategy ret = new DiskReadZip_FileTable(this, m_Conn);

            ret.Name = tableName;
            return(ret);
        }
コード例 #2
0
        /// <summary>
        /// tableName 支持[a-F]以及[_],内部最好别带 . / \\ ?等非法字符
        /// </summary>
        /// <param name="tableName"></param>
        /// <returns></returns>
        public IFileSysPackerStrategy AddFileTable(string tableName)
        {
            if (string.IsNullOrEmpty(tableName))
            {
                throw new ArgumentNullException(tableName);
            }
            try {
                if (IsTableExists(tableName))
                {
                    throw new DiskZip_AccessPackerException(tableName + "已经存在", null);
                }

                DiskReadZip_ConnectInfo m_Conn = CheckConnection(tableName);
                IFileSysPackerStrategy  ret    = new DiskReadZip_FileTable(this, m_Conn);
                ret.Name = tableName;
                //建立SQLite_FileItemInfo结构的表名
                //m_Conn.CreateTable<SQLite_FileItemInfo>();
                return(ret);
            }
            catch (Exception ee) {
                throw new DiskZip_AccessPackerException("访问文件目录时发生错误", ee);
            }
            return(null);
        }
コード例 #3
0
        public IFileSysPackerStrategy GetFileTable(string tableName)
        {
            if (string.IsNullOrEmpty(tableName)) {
                throw new ArgumentNullException(tableName);
            }
            if (!IsTableExists(tableName)) return null;
            DiskReadZip_ConnectInfo m_Conn = CheckConnection(tableName);

            IFileSysPackerStrategy ret = new DiskReadZip_FileTable(this, m_Conn);
            ret.Name = tableName;
            return ret;
        }
コード例 #4
0
        /// <summary>
        /// tableName 支持[a-F]以及[_],内部最好别带 . / \\ ?等非法字符
        /// </summary>
        /// <param name="tableName"></param>
        /// <returns></returns>
        public IFileSysPackerStrategy AddFileTable(string tableName)
        {
            if (string.IsNullOrEmpty(tableName)) {
                throw new ArgumentNullException(tableName);
            }
            try {

                if (IsTableExists(tableName)) throw new DiskZip_AccessPackerException(tableName + "已经存在", null);

                DiskReadZip_ConnectInfo m_Conn = CheckConnection(tableName);
                IFileSysPackerStrategy ret = new DiskReadZip_FileTable(this, m_Conn);
                ret.Name = tableName;
                //建立SQLite_FileItemInfo结构的表名
                //m_Conn.CreateTable<SQLite_FileItemInfo>();
                return ret;
            }
            catch (Exception ee) {
                throw new DiskZip_AccessPackerException("访问文件目录时发生错误", ee);
            }
            return null;
        }