00001
00014 #ifndef DIET_FMS_LIB_H
00015 #define DIET_FMS_LIB_H
00016
00017 #include <sys/types.h>
00018 #include <limits.h>
00019 #include <pthread.h>
00020
00024 typedef enum {
00025 DFMS_BLOCK,
00026 DFMS_CHARACTER,
00027 DFMS_DIRECTORY,
00028 DFMS_SYMLINK,
00029 DFMS_SOCKET,
00030 DFMS_FIFO,
00031 DFMS_REGULAR
00032 } diet_file_type_t;
00033
00038 struct diet_stat_t {
00039 char path[PATH_MAX];
00040 char owner[_POSIX_LOGIN_NAME_MAX];
00041 char group[_POSIX_LOGIN_NAME_MAX];
00042 mode_t perms;
00043 uid_t uid;
00044 gid_t gid;
00045 size_t size;
00046 time_t atime;
00047 time_t mtime;
00048 time_t ctime;
00049 diet_file_type_t type;
00050 };
00051
00057 int dietchgrp(const char* path, const char* group);
00058
00064 int dietchmod(const char* path, const mode_t mode);
00065
00071 int dietcp(const char* src, const char* dest);
00072
00079 int dietcp_async(const char* src, const char* dest,
00080 unsigned long long* thrRef);
00081
00089 int diethead(const char* path, const unsigned int nline,
00090 char* buffer, const size_t maxsize);
00091
00098 int dietls(const char* path, char* buffer, const size_t maxsize);
00099
00105 int dietmkdir(const char* path, const mode_t mode);
00106
00112 int dietmv(const char* src, const char* dest);
00113
00120 int dietmv_async(const char* src, const char* dest,
00121 unsigned long long* thrRef);
00122
00127 int dietrm(const char* path);
00128
00133 int dietrmdir(const char* path);
00134
00142 int diettail(const char* path, const unsigned int nline, char* buffer,
00143 const size_t maxsize);
00144
00150 int dietstat(const char* path, struct diet_stat_t* buf);
00151
00157 int dietwait(const unsigned long long thrID);
00158
00159 #endif