overrides file directly

master
Administrator 8 years ago
parent 706f4a1f81
commit b591cfd96d

@ -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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' 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 <http://www.gnu.org/licenses/>.
' /********************************************************************************/
' Summaries:
' Class CLI
'
' Constructor: (+1 Overloads) Sub New
'
' Function: GetBucketStorageDeviceList, ListObjects
'
' Sub: Copy
'
' /********************************************************************************/
#End Region
@ -76,7 +76,7 @@ Public Class CLI : Inherits InteropService
<MethodImpl(MethodImplOptions.AggressiveInlining)>
Public Function GetBucketStorageDeviceList() As IEnumerable(Of Bucket)
Return RunProgram("ls").ShellExec.ParseBuckets
Return RunProgram("ls", stdin:="y").ShellExec.ParseBuckets
End Function
''' <summary>
@ -86,11 +86,16 @@ Public Class CLI : Inherits InteropService
''' <returns></returns>
<MethodImpl(MethodImplOptions.AggressiveInlining)>
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
''' <summary>
''' File copy operation between the OSS and local file system. FileUpload and FileDownload
''' </summary>
''' <param name="from$"></param>
''' <param name="to$"></param>
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!

@ -278,7 +278,7 @@ Public Class FileSystem
End Function
''' <summary>
'''
''' File upload from local filesystem
''' </summary>
''' <param name="local$"></param>
''' <param name="remote$"></param>

Loading…
Cancel
Save