DownloadToFile() public method

Downloads the blob's contents to a file.
public DownloadToFile ( string fileName ) : void
fileName string The path and file name of the target file.
return void
		public TaskRunner CreateUpdateTaskRunner(CloudBlob blob, FileInformation fileInfo)
		{
			this._statistics.UpdatedCount++;
			return new SingleActionTaskRunner(() =>
			{
				_messageBus.Publish(new FileProgressedMessage(fileInfo.FullPath, 0));
				blob.DownloadToFile(fileInfo.FullPath);
				_fileSystem.SetLastWriteTimeUtc(fileInfo.FullPath, blob.GetFileLastModifiedUtc());
				_messageBus.Publish(new FileProgressedMessage(fileInfo.FullPath, 1));
			});
		}
		public TaskRunner CreateFileNotExistsTaskRunner(CloudBlob blob, string basePath)
		{
			this._statistics.FileNotExistCount++;
			string relativePath = blob.GetRelativeFilePath();
			string fullFilePath = this._fileSystem.Combine(basePath, relativePath);

			if (blob.Properties.Length > CloudBlobConstants.FileSizeThresholdInBytes)
			{
				return new DownloadLargeFileTaskRunner(_messageBus, _fileSystem, blob, fullFilePath);
			}
			else
			{
				return new SingleActionTaskRunner(() =>
				{
					_messageBus.Publish(new FileProgressedMessage(fullFilePath, 0));
					_fileSystem.EnsureFileDirectory(fullFilePath);
					blob.DownloadToFile(fullFilePath);
					_fileSystem.SetLastWriteTimeUtc(fullFilePath, blob.GetFileLastModifiedUtc());
					_messageBus.Publish(new FileProgressedMessage(fullFilePath, 1));
				});
			}
		}