From 706f4a1f818d233139287edd9ca52135342d979b Mon Sep 17 00:00:00 2001 From: xieguigang Date: Thu, 19 Apr 2018 11:35:35 +0800 Subject: [PATCH 1/2] fix type referene errors --- ossutil/Extensions.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/ossutil/Extensions.vb b/ossutil/Extensions.vb index 35a0fe4..2c312ae 100644 --- a/ossutil/Extensions.vb +++ b/ossutil/Extensions.vb @@ -41,6 +41,7 @@ Imports System.Runtime.CompilerServices Imports Microsoft.VisualBasic.Data.GraphTheory +Imports ThinkVB.FileSystem.OSS.Model Public Module Extensions From b591cfd96d2c5807283874596d9782bae6bb267b Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 19 Apr 2018 14:52:30 +0800 Subject: [PATCH 2/2] overrides file directly --- ossutil/CLI.vb | 91 +++++++++++++++++++++++-------------------- ossutil/FileSystem.vb | 2 +- 2 files changed, 49 insertions(+), 44 deletions(-) diff --git a/ossutil/CLI.vb b/ossutil/CLI.vb index 7d579e0..871ab94 100644 --- a/ossutil/CLI.vb +++ b/ossutil/CLI.vb @@ -1,45 +1,45 @@ #Region "Microsoft.VisualBasic::41b2c7a1b7128583a0d4aa5a13d8a609, ossutil\CLI.vb" - ' Author: - ' - ' asuka (amethyst.asuka@gcmodeller.org) - ' xie (genetics@smrucc.org) - ' xieguigang (xie.guigang@live.com) - ' - ' Copyright (c) 2018 GPL3 Licensed - ' - ' - ' GNU GENERAL PUBLIC LICENSE (GPL3) - ' - ' - ' This program is free software: you can redistribute it and/or modify - ' it under the terms of the GNU General Public License as published by - ' the Free Software Foundation, either version 3 of the License, or - ' (at your option) any later version. - ' - ' This program is distributed in the hope that it will be useful, - ' but WITHOUT ANY WARRANTY; without even the implied warranty of - ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - ' GNU General Public License for more details. - ' - ' You should have received a copy of the GNU General Public License - ' along with this program. If not, see . - - - - ' /********************************************************************************/ - - ' Summaries: - - ' Class CLI - ' - ' Constructor: (+1 Overloads) Sub New - ' - ' Function: GetBucketStorageDeviceList, ListObjects - ' - ' Sub: Copy - ' - ' /********************************************************************************/ +' Author: +' +' asuka (amethyst.asuka@gcmodeller.org) +' xie (genetics@smrucc.org) +' xieguigang (xie.guigang@live.com) +' +' Copyright (c) 2018 GPL3 Licensed +' +' +' GNU GENERAL PUBLIC LICENSE (GPL3) +' +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + + + +' /********************************************************************************/ + +' Summaries: + +' Class CLI +' +' Constructor: (+1 Overloads) Sub New +' +' Function: GetBucketStorageDeviceList, ListObjects +' +' Sub: Copy +' +' /********************************************************************************/ #End Region @@ -76,7 +76,7 @@ Public Class CLI : Inherits InteropService Public Function GetBucketStorageDeviceList() As IEnumerable(Of Bucket) - Return RunProgram("ls").ShellExec.ParseBuckets + Return RunProgram("ls", stdin:="y").ShellExec.ParseBuckets End Function ''' @@ -86,11 +86,16 @@ Public Class CLI : Inherits InteropService ''' Public Function ListObjects(uri As String) As IEnumerable(Of [Object]) - Return RunProgram($"ls {uri}").ShellExec.ParseObjects + Return RunProgram($"ls {uri}", stdin:="y").ShellExec.ParseObjects End Function + ''' + ''' File copy operation between the OSS and local file system. FileUpload and FileDownload + ''' + ''' + ''' Public Sub Copy(from$, to$) - Dim stdout$ = RunProgram($"cp {from.CLIToken} {[to].CLIToken}").ShellExec + Dim stdout$ = RunProgram($"cp {from.CLIToken} {[to].CLIToken}", stdin:="y").ShellExec ' FinishWithError: Scanned 1 objects. Error num: 1. OK num: 0, Transfer size: 0. ' Error: oss: service returned without a response body (404 Not Found), Bucket=bionovogene-xcms, Object=mz.biodeep.cn/data/upload/rawfiles/225/181/1761/T201710170947282738.mzXML! diff --git a/ossutil/FileSystem.vb b/ossutil/FileSystem.vb index f165c24..b2f243a 100644 --- a/ossutil/FileSystem.vb +++ b/ossutil/FileSystem.vb @@ -278,7 +278,7 @@ Public Class FileSystem End Function ''' - ''' + ''' File upload from local filesystem ''' ''' ''' 不要求远程对象必须要存在