/// <summary> /// Creates the page folder of the workroom start page, if it isn't already created. /// </summary> /// <param name="workroomPage">The workroom start page.</param> private static void CreateFolder(PageData workroomPage) { //We want to allow folder to be created without access checks performed therefore this //construction. Otherwise it would be enough to call CurrentPage.GetPageDirectory(true) UnifiedDirectory pageDirectory = workroomPage.GetPageDirectory(false); if (pageDirectory == null) { UnifiedDirectory rootDirectory = VirtualPathHandler.Instance.GetDirectory(VirtualPathHandler.PageDirectoryRootVirtualPath, true) as UnifiedDirectory; rootDirectory.CreateSubdirectory(workroomPage.Property["PageFolderID"].ToString()); } }
/// <summary> /// Creates a new directory in the supplied parent directory. /// </summary> /// <param name="parentDirectory">The parent directory in which to create a sub directory.</param> /// <param name="directoryName">Name of the new directory.</param> public static void CreateDirectory(UnifiedDirectory parentDirectory, string directoryName) { parentDirectory.CreateSubdirectory(directoryName); }