Microsoft.Azure.Commands.Batch.Models.BatchClient.DownloadNodeFileByInstance C# (CSharp) Method

DownloadNodeFileByInstance() private method

private DownloadNodeFileByInstance ( Microsoft.Azure.Batch.NodeFile file, string destinationPath, Stream stream, IEnumerable additionalBehaviors = null ) : void
file Microsoft.Azure.Batch.NodeFile
destinationPath string
stream Stream
additionalBehaviors IEnumerable
return void
        private void DownloadNodeFileByInstance(NodeFile file, string destinationPath, Stream stream, IEnumerable<BatchClientBehavior> additionalBehaviors = null)
        {
            if (stream != null)
            {
                // Don't dispose supplied Stream
                file.CopyToStream(stream, additionalBehaviors);
            }
            else
            {
                WriteVerbose(string.Format(Resources.DownloadingNodeFile, file.Name, destinationPath));
                using (FileStream fs = new FileStream(destinationPath, FileMode.Create))
                {
                    file.CopyToStream(fs, additionalBehaviors);
                }
            }
        }
BatchClient