aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs')
-rw-r--r--OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
index 0704232..83ac239 100644
--- a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
+++ b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
@@ -92,6 +92,42 @@ namespace OpenSim.Framework.Communications.Cache
92 92
93 return null; 93 return null;
94 } 94 }
95
96 /// <summary>
97 /// Add a folder that already exists.
98 /// </summary>
99 /// <param name="folder"></param>
100 public void AddChildFolder(InventoryFolderImpl folder)
101 {
102 lock (SubFolders)
103 {
104 folder.ParentID = ID;
105 SubFolders[folder.ID] = folder;
106 }
107 }
108
109 /// <summary>
110 /// Removes the given child subfolder.
111 /// </summary>
112 /// <param name="folderID"></param>
113 /// <returns>
114 /// The folder removed, or null if the folder was not present.
115 /// </returns>
116 public InventoryFolderImpl RemoveChildFolder(UUID folderID)
117 {
118 InventoryFolderImpl removedFolder = null;
119
120 lock (SubFolders)
121 {
122 if (SubFolders.ContainsKey(folderID))
123 {
124 removedFolder = SubFolders[folderID];
125 SubFolders.Remove(folderID);
126 }
127 }
128
129 return removedFolder;
130 }
95 131
96 /// <summary> 132 /// <summary>
97 /// Delete all the folders and items in this folder. 133 /// Delete all the folders and items in this folder.