input: 
  class FileSystem(object):
      """
      The FileSystem class provides methods for saving, deleting, and finding task data.
      When creating an instance, provide a parameter dictionary that includes a 'taskDir' key
      specifying the directory where task data should be stored. The methods are:
      
      - save_task(data): Saves task data. If the data does not include an 'id' key, one will be generated.
      - delete_task(task_id): Deletes the task data for the given task ID.
      - find_by_id(task_id): Finds and returns the task data for the given task ID.
      - find_by_ids(task_ids): Finds and returns a list of task data for the given list of task IDs.
      - all_task_data(order='asc'): Returns a list of all task data, sorted by ID in the specified order (ascending by default).
      - task_data(task_id): Returns the task data for the given task ID, or None if the task data is not found.
  
      Example:
      fs = FileSystem({'taskDir': '~/tasks/'})
      fs.save_task({'name': 'Task1', 'description': 'This is task 1'})
      fs.delete_task(1)
      fs.find_by_id(2)
      fs.find_by_ids([2, 3, 4])
      fs.all_task_data(order='desc')
      fs.task_data(5)
      """
  
output:     
      def __init__(self, params):
          self.taskDir = params['taskDir']
          self.tasks = {}
  
      def save_task(self, data):
          if 'id' not in data:
              data['id'] = len(self.tasks) + 1
          self.tasks[data['id']] = data
          return data['id']
  
      def delete_task(self, task_id):
          if task_id in self.tasks:
              del self.tasks[task_id]
  
      def find_by_id(self, task_id):
          return self.tasks.get(task_id, None)
  
      def find_by_ids(self, task_ids):
          return [self.tasks.get(tid, None) for tid in task_ids]
  
      def all_task_data(self, order='asc'):
          sorted_tasks = sorted(self.tasks.values(), key=lambda x: x['id'], reverse=(order == 'desc'))
          return sorted_tasks
  
      def task_data(self, task_id):
          return self.tasks.get(task_id, None)
  