Adding files to a page's folder in PageFiles

I need to add some files to a page's folder in PageFiles. I've tried something like this without any luck: string pageFileID = Convert.ToString(pd["PageFolderID"]); UnifiedDirectory pageFile = UnifiedFileSystem.GetDirectory( pageFileID ); //Is page directory does not exist, create one if (pageFile == null) pageFile = UnifiedFileSystem.CreateDirectory( pageFileID ); //Create a file pageFile.CreateFile("testing.txt"); The problem is that I do not get any directory object from neither GetDirectory nor CreateDirectory.
Dec 07, 2005 13:41
Hi! You should use UnifiedPageDirectory instead: UnifiedDirectory dir = UnifiedPageDirectory.Get(pd.PageLink);
Dec 28, 2005 17:30
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.