London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Adding files to a page's folder in PageFiles

Vote:
0
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.
#12467
Dec 07, 2005 13:41
Vote:
0
Hi! You should use UnifiedPageDirectory instead: UnifiedDirectory dir = UnifiedPageDirectory.Get(pd.PageLink);
#14320
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.