osutils/file.go
func SafeCreateSSH(client SFTPClient, name ...string) (file *sftp.File, err error) {
	ssh := sshClientBucket{
		client: client,
	}
	fpath := path.Join(name...)
	basepath := filepath.Dir(fpath)

	if err = ssh.remoteSafeMkdirAll(basepath); err == nil {
		file, err = client.Create(fpath)
	}
	return
}
func SafeCreateSSH(client SFTPClient, name ...string) (file *sftp.File, err error) {
	ssh := sshClientBucket{
		client: client,
	}
	fpath := path.Join(name...)
	basepath := filepath.Dir(fpath)

	if err = ssh.remoteSafeMkdirAll(basepath); err == nil {
		file, err = client.Create(fpath)
	}
	return
}
func SafeCreateSSH ( client SFTPClient , name ... string ) ( file * sftp . File , err error ) { ssh := sshClientBucket { client : client , } fpath := path . Join ( name ... ) basepath := filepath . Dir ( fpath ) if err = ssh . remoteSafeMkdirAll ( basepath ) ; err == nil { file , err = client . Create ( fpath ) } return }
// SafeCreateSSH creates a file, creating parent directories if needed on a remote machine via an ssh client
SafeCreateSSH creates a file creating parent directories if needed on a remote machine via an ssh client