Cmis.Utility.CmisNavigation.CreateFolder C# (CSharp) Method

CreateFolder() public method

public CreateFolder ( CmisPath path, bool recursive ) : IFolder
path CmisPath
recursive bool
return IFolder
        public IFolder CreateFolder(CmisPath path, bool recursive)
        {
            return CreateFolder(path, recursive, null);
        }

Same methods

CmisNavigation::CreateFolder ( CmisPath path, bool recursive, object>.IDictionary properties ) : IFolder

Usage Example

/*
 TODO: enable yupport for properties
        [Parameter(Position = 1, Mandatory = false)]
        public Hashtable Properties { get; set; }
*/
        protected override void ProcessRecord()
        {
            var navigation = new CmisNavigation(CmisSession, WorkingFolder);
            foreach (string p in Path)
            {
                try
                {
//                    var props = Utilities.HashtableToDict(Properties);
//                    WriteObject(navigation.CreateFolder(p, Recursive.IsPresent, props));
                    WriteObject(navigation.CreateFolder(p, Recursive.IsPresent, null));
                }
                catch (CmisBaseException e)
                {
                    ThrowTerminatingError(new ErrorRecord(e, "FolderCreationFailed",
                                                          ErrorCategory.WriteError, p));
                }
            }
        }