/// <summary> /// delete file /// 改名文件 /// </summary> /// <param name="ID"></param> /// <param name="FileName"></param> /// <param name="GridFSName"></param> public void ReNameFile(String ID, String FileName, String GridFSName = "") { //数据库连接 if (_connectionConfig.IsAutoCloseConnection == false) { if (_database.CheckStatus() == false) { throw new Exception("databse connect not open"); } } if (_connectionConfig.IsAutoCloseConnection == true) { _database.Open(); } _database.ReNameFile(_databasename, ID, FileName, GridFSName); if (_connectionConfig.IsAutoCloseConnection == true) { _database.Close(); } return; }