示例#1
0
    def __init__(self, protocol, host, rootdir='', file_list=None):
        '''

        Initialize the files in list with today as last-modification date.
        Size is also preset to zero, size will be set after download

        :param file_list: list of files to download on server
        :type file_list: list
        '''
        FTPDownload.__init__(self, protocol, host, rootdir)
        if file_list is None:
            file_list = []
        today = datetime.date.today()
        self.files_to_download = []
        self.headers = {}
        for file in file_list:
            rfile = {}
            rfile['root'] = self.rootdir
            rfile['permissions'] = ''
            rfile['group'] = ''
            rfile['user'] = ''
            rfile['size'] = 0
            rfile['month'] = today.month
            rfile['day'] = today.day
            rfile['year'] = today.year
            rfile['name'] = file
            self.files_to_download.append(rfile)
示例#2
0
    def __init__(self, protocol, host, rootdir='', file_list=None):
        '''

        Initialize the files in list with today as last-modification date.
        Size is also preset to zero, size will be set after download

        :param file_list: list of files to download on server
        :type file_list: list
        '''
        FTPDownload.__init__(self, protocol, host, rootdir)
        if file_list is None:
            file_list = []
        today = datetime.date.today()
        self.files_to_download = []
        self.headers = {}
        for file in file_list:
            rfile = {}
            rfile['root'] = self.rootdir
            rfile['permissions'] = ''
            rfile['group'] = ''
            rfile['user'] = ''
            rfile['size'] = 0
            rfile['month'] = today.month
            rfile['day'] = today.day
            rfile['year'] = today.year
            rfile['name'] = file
            rfile['hash'] = None
            self.files_to_download.append(rfile)
示例#3
0
 def __init__(self, protocol, host, rootdir, config):
     FTPDownload.__init__(self, protocol, host, rootdir)
     self.config = config
示例#4
0
 def __init__(self, protocol, host, rootdir, config):
     FTPDownload.__init__(self, protocol, host, rootdir)
     self.config = config