1 #ifndef HEAVY_FILE_OPERATIONS_CLASS
2 #define HEAVY_FILE_OPERATIONS_CLASS
65 OKAY = basis::common::OKAY,
69 DEFINE_OUTCOME(TARGET_DIR_ERROR, -44,
"The target's directory could not "
71 DEFINE_OUTCOME(TARGET_ACCESS_ERROR, -45,
"The target file could not be "
Provides a dynamically resizable ASCII character string.
A very common template for a dynamic array of bytes.
Outcomes describe the state of completion for an operation.
A base class for objects that can pack into an array of bytes.
Provides serious file operations, such as copy and partial writing.
static size_t copy_chunk_factor()
method can be exported for use by shared libs.
static const size_t COPY_CHUNK_FACTOR
the default copy chunk size for the file copy method.
static basis::outcome copy_file(const basis::astring &source, const basis::astring &destination, int copy_chunk_factor=heavy_file_operations::copy_chunk_factor())
copies a file from the "source" location to the "destination".
DEFINE_CLASS_NAME("heavy_file_operations")
static basis::outcome write_file_chunk(const basis::astring &target, double byte_start, const basis::byte_array &chunk, bool truncate=true, int copy_chunk_factor=heavy_file_operations::copy_chunk_factor())
stores a chunk of bytes into the "target" file.
static const char * outcome_name(const basis::outcome &to_name)
virtual ~heavy_file_operations()
static basis::outcome buffer_files(const basis::astring &source_root, const filename_list &to_transfer, file_transfer_header &last_action, basis::byte_array &storage, int maximum_bytes)
reads files in "to_transfer" and packs them into a "storage" buffer.
A platform independent way to obtain the timestamp of a file.