Main File operation and file management API. More...
#include <sys/types.h>
#include <fcntl.h>
#include <dirent.h>
#include <sys/stat.h>
#include <unistd.h>
#include <attr/xattr.h>
#include <glib.h>
#include <global/gfal_global.h>
#include <common/gfal_constants.h>
Functions | |
int | gfal2_checksum (gfal2_context_t context, const char *url, const char *check_type, off_t start_offset, size_t data_length, char *checksum_buffer, size_t buffer_length, GError **err) |
int | gfal2_access (gfal2_context_t context, const char *url, int amode, GError **err) |
permission check | |
int | gfal2_chmod (gfal2_context_t context, const char *url, mode_t mode, GError **err) |
change file access permissions | |
int | gfal2_rename (gfal2_context_t context, const char *oldurl, const char *newurl, GError **err) |
change the name or location of a file | |
int | gfal2_stat (gfal2_context_t context, const char *url, struct stat *buff, GError **err) |
posix file status | |
int | gfal2_lstat (gfal2_context_t context, const char *url, struct stat *buff, GError **err) |
posix file status | |
int | gfal2_mkdir (gfal2_context_t context, const char *url, mode_t mode, GError **err) |
create directory | |
int | gfal2_mkdir_rec (gfal2_context_t context, const char *url, mode_t mode, GError **err) |
create directory | |
int | gfal2_rmdir (gfal2_context_t context, const char *url, GError **err) |
suppress a directory | |
DIR * | gfal2_opendir (gfal2_context_t context, const char *url, GError **err) |
open a directory for content listing | |
struct dirent * | gfal2_readdir (gfal2_context_t context, DIR *d, GError **err) |
return the next directory entry | |
struct dirent * | gfal2_readdirpp (gfal2_context_t context, DIR *d, struct stat *st, GError **err) |
return the next directory entry in addition of the entry meta-data | |
int | gfal2_closedir (gfal2_context_t context, DIR *d, GError **err) |
close a directory handle | |
int | gfal2_symlink (gfal2_context_t context, const char *oldpath, const char *newpath, GError **err) |
create a symbolic link | |
ssize_t | gfal2_readlink (gfal2_context_t context, const char *path, char *buff, size_t buffsiz, GError **err) |
read a symbolic link value, provide the linked file path | |
int | gfal2_unlink (gfal2_context_t context, const char *path, GError **err) |
Delete a file entry. | |
ssize_t | gfal2_listxattr (gfal2_context_t context, const char *path, char *list, size_t size, GError **err) |
list extended attributes of a resource. | |
ssize_t | gfal2_getxattr (gfal2_context_t context, const char *path, const char *name, void *value, size_t size, GError **err) |
get an extended attribute value of a resource. | |
int | gfal2_setxattr (gfal2_context_t context, const char *path, const char *name, const void *value, size_t size, int flags, GError **err) |
set an extended attribute value of a resource. | |
int | gfal2_bring_online (gfal2_context_t context, const char *path, time_t pintime, time_t timeout, char *token, size_t tsize, int async, GError **err) |
Bring online a file. | |
int | gfal2_bring_online_poll (gfal2_context_t context, const char *path, const char *token, GError **err) |
Check for a bring online request. | |
int | gfal2_release_file (gfal2_context_t context, const char *path, const char *token, GError **err) |
Release a file. | |
int | gfal2_open (gfal2_context_t context, const char *path, int flag, GError **err) |
Open a file, return GFAL2 file descriptor. | |
int | gfal2_open2 (gfal2_context_t context, const char *path, int flag, mode_t mode, GError **err) |
int | gfal2_creat (gfal2_context_t context, const char *filename, mode_t mode, GError **err) |
ssize_t | gfal2_read (gfal2_context_t context, int fd, void *buff, size_t s_buff, GError **err) |
read data from a GFAL2 file descriptor | |
ssize_t | gfal2_write (gfal2_context_t context, int fd, const void *buff, size_t s_buff, GError **err) |
write data to a GFAL2 file descriptor | |
off_t | gfal2_lseek (gfal2_context_t context, int fd, off_t offset, int whence, GError **err) |
move the file cursor | |
int | gfal2_close (gfal2_context_t context, int fd, GError **err) |
close a file GFAL2 descriptor | |
int | gfal2_flush (gfal2_context_t context, int fd, GError **err) |
flush all buffered data for the given file descriptor | |
ssize_t | gfal2_pread (gfal2_context_t context, int fd, void *buffer, size_t count, off_t offset, GError **err) |
ssize_t | gfal2_pwrite (gfal2_context_t context, int fd, const void *buffer, size_t count, off_t offset, GError **err) |
Main File operation and file management API.