int smbc_rename(const char *ourl, const char *nurl) { return smbc_getFunctionRename(statcont)(statcont, ourl, statcont, nurl); }
static PyObject * Context_rename (Context *self, PyObject *args) { int ret; char *ouri = NULL; char *nuri = NULL; Context *nctx = NULL; smbc_rename_fn fn; if (!PyArg_ParseTuple (args, "ss|O", &ouri, &nuri, &nctx)) { return NULL; } fn = smbc_getFunctionRename(self->context); errno = 0; if (nctx && nctx->context) { ret = (*fn) (self->context, ouri, nctx->context, nuri); } else { ret = (*fn) (self->context, ouri, self->context, nuri); } if (ret < 0) { pysmbc_SetFromErrno (); return NULL; } return PyLong_FromLong (ret); }
int SmbFs::fs_rename(const char *from, const char *to) { QMutexLocker locker(&_mutex); if((smbc_getFunctionRename(_ctx))(_ctx, qPrintable(getPath(from)),_ctx,qPrintable(getPath(to))) == 0) return(0); else return(-errno); }