示例#1
0
 protected override void ProcessRecord()
 {
     try
     {
         var logger = new PsCmdletLogger(this);
         s3FileSystem = new S3FileSystem(logger, AccessKey, Secret, new AmazonS3Config());
         s3FileSystem.UploadFiles(new DirectoryInfoWrap(Folder), Recurse, Bucket, SetPublicRead);
     }
     catch (Exception e)
     {
         ThrowTerminatingError(
             new ErrorRecord(
                 e,
                 "Copy-FilesToS3",
                 ErrorCategory.NotSpecified,
                 this
                 )
             );
     }
 }
示例#2
0
 protected override void ProcessRecord()
 {
     try
     {
         var logger = new PsCmdletLogger(this);
         s3FileSystem = new S3FileSystem(logger, AccessKey, Secret, new AmazonS3Config());
         s3FileSystem.UploadFiles(new DirectoryInfoWrap(Folder), Recurse, Bucket, SetPublicRead);
     }
     catch (Exception e)
     {
         ThrowTerminatingError(
             new ErrorRecord(
                 e,
                 "Copy-FilesToS3",
                 ErrorCategory.NotSpecified,
                 this
                 )
             );
     }
 }