14 #ifndef __INCLUDED_SCOPIRA_TOOL_FILEFLOW_H__ 15 #define __INCLUDED_SCOPIRA_TOOL_FILEFLOW_H__ 19 #include <scopira/tool/platform.h> 21 #include <scopira/tool/flow.h> 22 #include <scopira/tool/export.h> 47 bool copy_file(
const std::string &srcfile,
const std::string &destfile,
short copytype = copy_c);
97 typedef ::off_t offset_t;
113 SCOPIRA_EXPORT
fileflow(
const std::string& filename,
mode_t mode);
124 SCOPIRA_EXPORT
virtual ~fileflow();
132 SCOPIRA_EXPORT
virtual bool failed(
void)
const;
142 SCOPIRA_EXPORT
virtual size_t read(
byte_t* _buf,
size_t _maxsize);
151 SCOPIRA_EXPORT
virtual size_t write(
const byte_t* _buf,
size_t _size);
173 SCOPIRA_EXPORT
void open(
const std::string& filename,
mode_t mode);
189 SCOPIRA_EXPORT
void open(
int fd,
mode_t mode);
200 SCOPIRA_EXPORT
void close(
void);
203 int get_os_handle(
void)
const {
return dm_hand; }
208 SCOPIRA_EXPORT offset_t
seek(offset_t howmuch, seek_dir_t dir = seek_start_c);
213 SCOPIRA_EXPORT offset_t
tell(
void)
const;
222 SCOPIRA_EXPORT
bool resize(offset_t newsz);
263 SCOPIRA_EXPORT
void unlock(
void);
304 typedef ::off_t offset_t;
314 #ifdef PLATFORM_win32 315 HANDLE dm_mappingobj;
321 SCOPIRA_EXPORT ~filememory();
331 SCOPIRA_EXPORT
bool open(
fileflow &f,
size_t len,
int flags = read_c|write_c);
333 SCOPIRA_EXPORT
void close(
void);
336 SCOPIRA_EXPORT
void sync(
void);
Definition: archiveflow.h:20