def unlink(self, pathobj):
        """
        Removes a file
        """
        stat = self.stat(pathobj)

        if stat.is_dir:
            raise OSError(1, "Operation not permitted: '%s'" % str(pathobj))

        url = str(pathobj)
        text, code = self.rest_del(url, auth=pathobj.auth, verify=pathobj.verify,
                                   cert=pathobj.cert)

        if code not in [200, 202, 204]:
            raise RuntimeError("Failed to delete file: %d '%s'" % (code, text))
dataset/ETHPy150Open Parallels/artifactory/artifactory.py/_ArtifactoryAccessor.unlink/original