1 #ifndef __ARC_FILEACCESS_H__
2 #define __ARC_FILEACCESS_H__
51 bool fa_mkdir(
const std::string& path, mode_t mode);
54 bool fa_mkdirp(
const std::string& path, mode_t mode);
56 bool fa_link(
const std::string& oldpath,
const std::string& newpath);
58 bool fa_softlink(
const std::string& oldpath,
const std::string& newpath);
61 bool fa_copy(
const std::string& oldpath,
const std::string& newpath, mode_t mode);
63 bool fa_rename(
const std::string& oldpath,
const std::string& newpath);
65 bool fa_chmod(
const std::string& path,mode_t mode);
67 bool fa_stat(
const std::string& path,
struct stat& st);
69 bool fa_lstat(
const std::string& path,
struct stat& st);
77 bool fa_readlink(
const std::string& path, std::string& linkpath);
83 bool fa_rmdir(
const std::string& path);
93 bool fa_open(
const std::string& path,
int flags, mode_t mode);
99 bool fa_mkstemp(std::string& path, mode_t mode);
101 off_t
fa_lseek(off_t offset,
int whence);
103 ssize_t
fa_read(
void* buf,
size_t size);
105 ssize_t
fa_write(
const void* buf,
size_t size);
107 ssize_t
fa_pread(
void* buf,
size_t size,off_t offset);
109 ssize_t
fa_pwrite(
const void* buf,
size_t size,off_t offset);
113 operator bool(
void) {
return (file_access_ != NULL); };
115 bool operator!(
void) {
return (file_access_ == NULL); };
156 void SetMin(
unsigned int val);
158 void SetMax(
unsigned int val);
163 std::list<FileAccess*> fas_;
164 void KeepRange(
void);
169 #endif // __ARC_FILEACCESS_H__