int ceph_unlink(ceph_mount_info *cmount, const char *path)
int ceph_unlinkat(ceph_mount_info *cmount, int dirfd, const char *relpath, int flags)
int ceph_symlink(ceph_mount_info *cmount, const char *existing, const char *newname)
+ int ceph_symlinkat(ceph_mount_info *cmount, const char *existing, int fd, const char *newname)
int ceph_readlink(ceph_mount_info *cmount, const char *path, char *buf, int64_t size)
int ceph_readlinkat(ceph_mount_info *cmount, const int dirfd, char *path, char *buf, int64_t size)
int ceph_setxattr(ceph_mount_info *cmount, const char *path, const char *name,
ret = ceph_symlink(self.cluster, _existing, _newname)
if ret < 0:
raise make_ex(ret, "error in symlink")
-
+
+ def symlinkat(self, existing, fd, newname):
+ self.require_state("mounted")
+
+ if not isinstance(fd, int):
+ raise TypeError('"fd" must be of type int')
+
+ existing = cstr(existing, 'existing')
+ newname = cstr(newname, 'newname')
+ cdef:
+ int _fd = fd
+ char* _existing = existing
+ char* _newname = newname
+
+ with nogil:
+ ret = ceph_symlinkat(self.cluster, _existing, _fd, _newname)
+
+ if ret < 0:
+ raise make_ex(ret, "error in symlinkat")
+
def link(self, existing, newname):
"""
Create a link.
pass
int ceph_symlink(ceph_mount_info *cmount, const char *existing, const char *newname):
pass
+ int ceph_symlinkat(ceph_mount_info *cmount, const char *existing, int fd,
+ const char *newname):
+ pass
int ceph_readlink(ceph_mount_info *cmount, const char *path, char *buf, int64_t size):
pass
int ceph_readlinkat(ceph_mount_info *cmount, const int dirfd, char *path,