Ignore:
Timestamp:
Jul 29, 2013, 7:05:52 AM (6 years ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Implemented `unlink` as an alias of `remove`.

I've no idea why this used to be an extra method. Still, after making
the change, all unit tests keep working (as expected).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ftputil/host.py

    r1299 r1301  
    640640
    641641    def remove(self, path):
    642         """Remove the given file or link."""
     642        """
     643        Remove the file or link given by `path`.
     644
     645        Raise a `PermanentError` if the path doesn't exist, but maybe
     646        raise other exceptions depending on the state of the server
     647        (e. g. timeout).
     648        """
    643649        path = ftputil.tool.as_unicode(path)
    644650        path = self.path.abspath(path)
     
    660666        self.stat_cache.invalidate(path)
    661667
    662     def unlink(self, path):
    663         """
    664         Remove the file or link given by `path`.
    665 
    666         Raise a `PermanentError` if the path doesn't exist, but maybe
    667         raise other exceptions depending on the state of the server
    668         (e. g. timeout).
    669         """
    670         path = ftputil.tool.as_unicode(path)
    671         self.remove(path)
     668    unlink = remove
    672669
    673670    def rmtree(self, path, ignore_errors=False, onerror=None):
Note: See TracChangeset for help on using the changeset viewer.