protected override void EndProcessing()
{
var path = new CmisPath(Path);
if (LocalFile != null && path.HasTrailingSlash())
{
path = path.Combine(System.IO.Path.GetFileName(LocalFile));
}
var nav = new CmisNavigation(CmisSession, WorkingFolder);
// var props = Utilities.HashtableToDict(Properties);
var stream = GetContentStream();
try
{
// WriteObject(nav.CreateDocument(path, stream, props));
WriteObject(nav.CreateDocument(path, stream, null));
}
catch (CmisBaseException e)
{
ThrowTerminatingError(new ErrorRecord(e, "CreateDocumentFailed",
ErrorCategory.WriteError, path));
}
finally
{
if (stream != null)
{
stream.Stream.Close();
}
}
}
}