/// <summary> /// This method will delete all the items and folders in the given folder. /// </summary> /// If the inventory service has not yet delievered the inventory /// for this user then the request will be queued. /// /// <param name="folderID"></param> public bool PurgeFolder(UUID folderID) { // m_log.InfoFormat("[AGENT INVENTORY]: Purging folder {0} for {1} uuid {2}", // folderID, remoteClient.Name, remoteClient.AgentId); if (m_hasReceivedInventory) { InventoryFolderImpl purgedFolder = RootFolder.FindFolder(folderID); if (purgedFolder != null) { // XXX Nasty - have to create a new object to hold details we already have InventoryFolderBase purgedBaseFolder = new InventoryFolderBase(); purgedBaseFolder.Owner = purgedFolder.Owner; purgedBaseFolder.ID = purgedFolder.ID; purgedBaseFolder.Name = purgedFolder.Name; purgedBaseFolder.ParentID = purgedFolder.ParentID; purgedBaseFolder.Type = purgedFolder.Type; purgedBaseFolder.Version = purgedFolder.Version; m_InventoryService.PurgeFolder(purgedBaseFolder); purgedFolder.Purge(); return(true); } } else { AddRequest( new InventoryRequest( Delegate.CreateDelegate(typeof(PurgeFolderDelegate), this, "PurgeFolder"), new object[] { folderID })); return(true); } return(false); }