示例#1
0
 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)))
示例#2
0
 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 []
示例#3
0
 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 []
示例#4
0
 def _getQueriesFiles(self):
     return sorted(
                 directoryItemPaths(
                     self.directory,
                     predicate=
                         lambda f : f.endswith('.queries.sql') and os.path.isfile(f)))