def _getQueriesFiles(self): """ Get the list of queries files, those ending with ``.queries.sql``. :return (list[str]): """ return sorted( directoryItemPaths(self.directory, predicate=lambda f: f.endswith('.queries.sql') and os.path.isfile(f)))
def _getStateDirectories(self): states_directory = os.path.join(self.directory, 'states') if (os.path.isdir(states_directory)): # there is a 'states' directory, directories inside are states name return directoryItemPaths( states_directory, lambda x:os.path.isdir(x) and not x.startswith('.')) else: return []
def _getStateDirectories(self): """ Get the list of state directories :return (list[str]): """ states_directory = os.path.join(self.directory, 'states') if (os.path.isdir(states_directory)): # there is a 'states' directory, directories inside are states name return directoryItemPaths( states_directory, lambda x:os.path.isdir(x) and not x.startswith('.')) else: return []
def _getQueriesFiles(self): return sorted( directoryItemPaths( self.directory, predicate= lambda f : f.endswith('.queries.sql') and os.path.isfile(f)))