'_trash(path, recursive=False)
Move a file or directory to trash.
Will create a timestamped directory underneath /user/<username>/.Trash.
Trash must be enabled for this to work.'

def _trash(self, path, recursive=False):

    if (not self.exists(path)):
        raise IOError(errno.ENOENT, (_('File    %s    not    found') % path))
    if ((not recursive) and self.isdir(path)):
        raise IOError(errno.EISDIR, (_('File    %s    is    a    directory') % path))
    if path.startswith(self.trash_path(path)):
        raise IOError(errno.EPERM, (_('File    %s    is    already    trashed') % path))
    base_trash_path = self.join(self._ensure_current_trash_directory(path), path[1:])
    trash_path = base_trash_path
    while self.exists(trash_path):
        trash_path = (base_trash_path + str(time.time()))
    self.mkdir(self.dirname(trash_path))
    self.rename(path, trash_path)
