code: def ls(path, force=False):
      
      path = expand_filepath(path)
      logger.debug('path={}'.format(path))
      if os.path.isfile(path):
          return path
      elif os.path.isdir(path):
          return os.listdir(path)
      elif not force:
          return os.listdir(path)
      try:
          return os.listdir(path)
      except IOError:
          pass
docs: bash `ls -a`: List both file paths or directory contents (files and directories)
  
      >>> ls('.')
      [...]
      >>> ls('~/')
      [...]
  
      >>> __file__.endswith(os.path.join('nlpia', 'futil.py'))
      True
      >>> ls(__file__).endswith(os.path.join('nlpia', 'futil.py'))
      True