Question

What else do I need to add to following code to make sure the folder is hidden or read only?

SPListItem createFolder = myDocLib.Folders.Add(myDocLib.RootFolder.ServerRelativeUrl,  SPFileSystemObjectType.Folder, "Folder444");

folder.Update();
Was it helpful?

Solution

There is no such thing as a hidden folder in SharePoint.

If you want to make it read only then you will need to break permission inheritance on the folder and modify the permissions.

Detailed answer can be found in the question you cross posted on StackOverflow.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top