(self, filename='')
Deletes given file or directory. If no filename is passed, current
        directory is removed.
Deletes given file or directory. If no filename is passed, current
        directory is removed.
Deletes given file or directory . If no filename is passed current directory is removed .
def delete(self, filename=''):
        """Deletes given file or directory. If no filename is passed, current
        directory is removed.
        """
        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
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