def get_config(self, remote=False): if remote == 'rclone': config = utils.configparser(remote='rclone') config.move_attributesB = ['hash.SHA-1'] else: config = utils.configparser(remote='rsync') if remote: config.userhost = os.environ['USER'] + '@localhost' # Specify the full executable to make sure not using an installed copy if remote == 'python2': exe = 'python2' elif remote == 'python3': exe = 'python3' pfs_path = os.path.normpath( os.path.join(os.path.dirname(__file__), '..', 'PyFiSync.py')) config.remote_exe = '{} {}'.format(exe, pfs_path) else: config.userhost = '' config.excludes += ['.DS_Store', '.git/', 'Thumbs.db'] config.pathA = os.path.join(self.testpath, 'A') config.pathB = os.path.join(self.testpath, 'B') return config
def get_config(self,remote=False): if remote == 'rclone': config = utils.configparser(remote='rclone') config.move_attributesB = ['hash.SHA-1'] else: config = utils.configparser(remote='rsync') if remote: config.userhost = os.environ['USER'] + '@localhost' if remote == 'python2': config.remote_program = 'python2' elif remote == 'python3': config.remote_program = 'python3' else: config.userhost = '' # This will need to change when/if there is no longer the PyFiSync.py # file (using, say, entry-points) config.PyFiSync_path = os.path.normpath(os.path.join(os.path.dirname(__file__),'..','PyFiSync.py')) config.excludes += ['.DS_Store','.git/','Thumbs.db'] config.pathA = os.path.join(self.testpath,'A') config.pathB = os.path.join(self.testpath,'B') return config
def _file_list(path, config=None): if config is None: config = utils.configparser() log = utils.logger(silent=True, path=None) _tmp = PFSwalk.file_list(path, config, log) return _tmp.files()