added sftp client implementation
This commit is contained in:
parent
ad41ddbe54
commit
ce73f0472c
175 changed files with 28135 additions and 13 deletions
34
vendor/github.com/pkg/sftp/request-plan9.go
generated
vendored
Normal file
34
vendor/github.com/pkg/sftp/request-plan9.go
generated
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
// +build plan9
|
||||
|
||||
package sftp
|
||||
|
||||
import (
|
||||
"path"
|
||||
"path/filepath"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func fakeFileInfoSys() interface{} {
|
||||
return &syscall.Dir{}
|
||||
}
|
||||
|
||||
func testOsSys(sys interface{}) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func toLocalPath(p string) string {
|
||||
lp := filepath.FromSlash(p)
|
||||
|
||||
if path.IsAbs(p) {
|
||||
tmp := lp[1:]
|
||||
|
||||
if filepath.IsAbs(tmp) {
|
||||
// If the FromSlash without any starting slashes is absolute,
|
||||
// then we have a filepath encoded with a prefix '/'.
|
||||
// e.g. "/#s/boot" to "#s/boot"
|
||||
return tmp
|
||||
}
|
||||
}
|
||||
|
||||
return lp
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue