code: def delete(self, filename=''):
          
          self._raise_if_none()
          fn = path_join(self.path, filename)
  
          try:
              if isfile(fn):
                  remove(fn)
              else:
                  removedirs(fn)
          except OSError as why:
              if why.errno == errno.ENOENT:
                  pass
              else:
                  raise why
docs: Deletes given file or directory. If no filename is passed, current
          directory is removed.