1 #ifndef __ARC_FILEACCESS_H__
2 #define __ARC_FILEACCESS_H__
58 bool fa_mkdir(
const std::string& path, mode_t mode);
65 bool fa_mkdirp(
const std::string& path, mode_t mode);
70 bool fa_link(
const std::string& oldpath,
const std::string& newpath);
75 bool fa_softlink(
const std::string& oldpath,
const std::string& newpath);
82 bool fa_copy(
const std::string& oldpath,
const std::string& newpath, mode_t mode);
87 bool fa_rename(
const std::string& oldpath,
const std::string& newpath);
92 bool fa_chmod(
const std::string& path,mode_t mode);
97 bool fa_stat(
const std::string& path,
struct stat& st);
102 bool fa_lstat(
const std::string& path,
struct stat& st);
122 bool fa_readlink(
const std::string& path, std::string& linkpath);
137 bool fa_rmdir(
const std::string& path);
164 bool fa_open(
const std::string& path,
int flags, mode_t mode);
177 bool fa_mkstemp(std::string& path, mode_t mode);
182 off_t
fa_lseek(off_t offset,
int whence);
187 ssize_t
fa_read(
void* buf,
size_t size);
192 ssize_t
fa_write(
const void* buf,
size_t size);
197 ssize_t
fa_pread(
void* buf,
size_t size,off_t offset);
202 ssize_t
fa_pwrite(
const void* buf,
size_t size,off_t offset);
206 operator bool(
void) {
return (file_access_ != NULL); };
208 bool operator!(
void) {
return (file_access_ == NULL); };
249 void SetMin(
unsigned int val);
251 void SetMax(
unsigned int val);
256 std::list<FileAccess*> fas_;
257 void KeepRange(
void);
262 #endif // __ARC_FILEACCESS_H__