/// <summary>
        /// Open file stream to read from database
        /// </summary>
        public LiteFileStream OpenRead()
        {
            if (_engine == null)
            {
                throw LiteException.NoDatabase();
            }

            return(new LiteFileStream(_engine, this));
        }
        /// <summary>
        /// Save file content to a external file
        /// </summary>
        public void SaveAs(string filename, bool overwritten = true)
        {
            if (_engine == null)
            {
                throw LiteException.NoDatabase();
            }

            using (var file = new FileStream(filename, overwritten ? FileMode.Create : FileMode.CreateNew))
            {
                this.OpenRead().CopyTo(file);
            }
        }