As the title suggests I'm using DFS 6.0 sp1. to create a folder in a repository with the below code.
How can I create the folder with a specific custom ACL?
private DataPackage CreateNewFolder(string newFolderPath, string newFolderName, string folderType)
{
ObjectPath objectPath = new ObjectPath(newFolderPath);
ObjectIdentity parentFolderIdentity = new ObjectIdentity(objectPath, DefaultRepository);
var folderRelationship = new ReferenceRelationship();
folderRelationship.Name = Relationship.RELATIONSHIP_FOLDER;
folderRelationship.Target = parentFolderIdentity;
folderRelationship.TargetRole = Relationship.ROLE_PARENT;
ObjectIdentity newFolderIdentity = new ObjectIdentity(DefaultRepository);
DataObject dataObject = new DataObject(newFolderIdentity, folderType);
dataObject.Relationships.Add(folderRelationship);
PropertySet properties = new PropertySet();
properties.Set("object_name", newFolderName);
dataObject.Properties = properties;
DataPackage dataPackage = new DataPackage(dataObject);
OperationOptions operationOptions = null;
return objectService.Create(dataPackage, operationOptions);
}