From 33bb4a84d748f74625232ec4170271c84fa0ca44 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Sun, 23 Dec 2007 04:33:08 +0000 Subject: [PATCH] Added a safer overload of CreateFolder() and documented both of the overloads git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1557 52acb1d6-8a22-11de-b505-999d5b087335 --- importprimscript/importprimscript.cs | 2 +- libsecondlife/InventoryManager.cs | 26 +++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/importprimscript/importprimscript.cs b/importprimscript/importprimscript.cs index d006ab48..8bd722c2 100644 --- a/importprimscript/importprimscript.cs +++ b/importprimscript/importprimscript.cs @@ -124,7 +124,7 @@ namespace importprimscript // // Create a folder to hold all of our texture uploads - UploadFolderID = Client.Inventory.CreateFolder(Client.Inventory.Store.RootFolder.UUID, AssetType.Unknown, scriptfilename); + UploadFolderID = Client.Inventory.CreateFolder(Client.Inventory.Store.RootFolder.UUID, scriptfilename); // Loop through each sculpty and do what we need to do for (int i = 0; i < sculpties.Count; i++) diff --git a/libsecondlife/InventoryManager.cs b/libsecondlife/InventoryManager.cs index 7132bdcd..1762365d 100644 --- a/libsecondlife/InventoryManager.cs +++ b/libsecondlife/InventoryManager.cs @@ -1125,7 +1125,31 @@ namespace libsecondlife _Client.Network.SendPacket(create); } - public LLUUID CreateFolder(LLUUID parentID, AssetType preferredType, string name) + /// + /// Creates a new inventory folder + /// + /// ID of the folder to put this folder in + /// Name of the folder to create + /// The UUID of the newly created folder + public LLUUID CreateFolder(LLUUID parentID, string name) + { + return CreateFolder(parentID, name, AssetType.Unknown); + } + + /// + /// Creates a new inventory folder + /// + /// ID of the folder to put this folder in + /// Name of the folder to create + /// Sets this folder as the default folder + /// for new assets of the specified type. Use AssetType.Unknown + /// to create a normal folder, otherwise it will likely create a + /// duplicate of an existing folder type + /// The UUID of the newly created folder + /// If you specify a preferred type of AsseType.Folder + /// it will create a new root folder which may likely cause all sorts + /// of strange problems + public LLUUID CreateFolder(LLUUID parentID, string name, AssetType preferredType) { LLUUID id = LLUUID.Random();