'upload(file_or_directory, remote=None)
Upload a file or directory to the remote host.
Arguments:
file_or_directory(str): Path to the file or directory to download.
remote(str): Local path to store the data.
By default, uses the working directory.'

def upload(self, file_or_directory, remote=None):

    if isinstance(file_or_directory, str):
        file_or_directory = os.path.expanduser(file_or_directory)
        file_or_directory = os.path.expandvars(file_or_directory)
    if os.path.isfile(file_or_directory):
        return self.upload_file(file_or_directory, remote)
    if os.path.isdir(file_or_directory):
        return self.upload_dir(file_or_directory, remote)
    self.error(('%r    does    not    exist' % file_or_directory))
