def msg_text(bot, update, user_data, job_queue): from filters import check_filters check_filters(bot, update) from sed import sed sed(bot, update) from stats import stats_check stats_check(bot, update, job_queue)
def filterdirs(dirs,base_dir=None,filters=(fs_filters.only_directories,),full_path=False): if base_dir: if full_path: return [os.path.join(base_dir,path) for path in dirs if fs_filters.check_filters(base_dir,path,_permissive_lstat(os.path.join(base_dir,path)),filters)] return [path for path in dirs if fs_filters.check_filters(base_dir,path,_permissive_lstat(os.path.join(base_dir,path)),filters)] return [path for path in dirs if fs_filters.check_filters(os.path.dirname(path),os.path.split(path)[1],_permissive_lstat(path),filters)]
def msg_text(bot, update, user_data): from filters import check_filters check_filters(bot, update)
def check(name): #TODO consider (base, dir_path,name, ...) return fs_filters.check_filters(dir_path, "", name, os.lstat(os.path.join(base or "",dir_path,name)),filters)