xrootd
|
00001 /******************************************************************************/ 00002 /* XrdFfsPosix.hh C wrapper to some of the Xrootd Posix library functions */ 00003 /* */ 00004 /* (c) 2010 by the Board of Trustees of the Leland Stanford, Jr., University */ 00005 /* All Rights Reserved */ 00006 /* Author: Wei Yang (SLAC National Accelerator Laboratory, 2009) */ 00007 /* Contract DE-AC02-76-SFO0515 with the Department of Energy */ 00008 /******************************************************************************/ 00009 00010 #include <dirent.h> 00011 #include <errno.h> 00012 #include <fcntl.h> 00013 #include <sys/stat.h> 00014 #include <sys/types.h> 00015 #include <sys/time.h> 00016 #include <sys/param.h> 00017 #include <sys/resource.h> 00018 #include <sys/uio.h> 00019 #include <unistd.h> 00020 #include <sys/statvfs.h> 00021 00022 00023 #ifdef __cplusplus 00024 extern "C" { 00025 #endif 00026 00027 int XrdFfsPosix_stat(const char *file_name, struct stat *buf); 00028 00029 DIR *XrdFfsPosix_opendir(const char *dirname); 00030 struct dirent *XrdFfsPosix_readdir(DIR *dirp); 00031 int XrdFfsPosix_closedir(DIR *dir); 00032 int XrdFfsPosix_mkdir(const char *path, mode_t mode); 00033 int XrdFfsPosix_rmdir(const char *path); 00034 00035 int XrdFfsPosix_open(const char *pathname, int flags, mode_t mode); 00036 off_t XrdFfsPosix_lseek(int fildes, off_t offset, int whence); 00037 ssize_t XrdFfsPosix_read(int fd, void *buf, size_t count); 00038 ssize_t XrdFfsPosix_pread(int fildes, void *buf, size_t nbyte, off_t offset); 00039 int XrdFfsPosix_close(int fd); 00040 ssize_t XrdFfsPosix_write(int fildes, const void *buf, size_t nbyte); 00041 ssize_t XrdFfsPosix_pwrite(int fildes, const void *buf, size_t nbyte, off_t offset); 00042 int XrdFfsPosix_fsync(int fildes); 00043 int XrdFfsPosix_unlink(const char *path); 00044 int XrdFfsPosix_rename(const char *oldpath, const char *newpath); 00045 int XrdFfsPosix_ftruncate(int fildes, off_t offset); 00046 int XrdFfsPosix_truncate(const char *path, off_t size); 00047 long long XrdFfsPosix_getxattr(const char *path, const char *name, void *value, unsigned long long size); 00048 00049 int XrdFfsPosix_unlinkall(const char *rdrurl, const char *path, uid_t user_uid); 00050 int XrdFfsPosix_rmdirall(const char *rdrurl, const char *path, uid_t user_uid); 00051 int XrdFfsPosix_renameall(const char *rdrurl, const char *from, const char *to, uid_t user_uid); 00052 int XrdFfsPosix_truncateall(const char *rdrurl, const char *path, off_t size, uid_t user_uid); 00053 int XrdFfsPosix_readdirall(const char *rdrurl, const char *path, char ***direntarray, uid_t user_uid); 00054 int XrdFfsPosix_statvfsall(const char *rdrurl, const char *path, struct statvfs *stbuf, uid_t user_uid); 00055 int XrdFfsPosix_statall(const char *rdrurl, const char *path, struct stat *stbuf, uid_t user_uid); 00056 00057 #ifdef __cplusplus 00058 } 00059 #endif