Ejemplo n.º 1
0
        /// <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());
            }
        }