I am running into a problem attempting this. I end up with an "Access to path 'MyNewFolder' is denied." Running it in a debug shows the actual exception is from System.UnathorizedAccessException. This behaviour is whether or not I run it with the optional "0" for insecure file system as the location.
My line of code is this:
FileSystemUtils.AddFolder(Me.PortalSettings(), "ProjectDocuments", txtBoxProjNum.Text(), 0)
ProjectDocuments is a folder under root that has write permissions for all users as of right now, but will be limited to a group that will have write access to this module doing the work and read for all.
txtProjNum is filled with a series of numbers seperated by dashes, 000139-08024-0.
I can add the folder using the file manager just fine, but I need to create a single button sub that will read this project number and create a role (working) followed by a series of folders (stuck on) assign permissions to those folders, and then create a documents module that will eventually be populted by the end-user using the subfolders created by this module. Until I get the folders created I will not really be able to get the permissions worked on...
I have been able to run foldercontroller.addfolder and get the folder listed in the database, but once it tries to sync and realizes the physical folder is not there it dissappears from the database.
I have run the module logged in as host, or not logged in at all with the same results.
Ideas?