3 const double timeoutVal = 5;
6 path.fix_dir_separator(
'\\');
9 filesystem::g_create_directory(path, abort);
10 }
catch(exception_io_already_exists) {}
17 filesystem::g_open_timeout(fLocal, path, filesystem::open_mode_write_existing, timeoutVal, abort);
19 }
catch(exception_io_not_found) {
20 filesystem::g_open_timeout(fLocal, path, filesystem::open_mode_write_new, timeoutVal, abort);
24 fLocal->resize(0, abort);
27 filesystem::g_open(fRemote, webURL, filesystem::open_mode_read, abort);
28 }
catch(exception_io_not_found) {
30 try { filesystem::g_remove_timeout(path, timeoutVal, abort); }
catch(...) {}
36 delta = fRemote->read(buffer.
get_ptr(), delta, abort);
37 fLocal->write(buffer.
get_ptr(), delta, abort);
38 if (delta < buffer.
get_size())
break;
40 fLocal->seek(0, abort);
const t_item * get_ptr() const
t_filetimestamp filetimestamp_from_system_timer()
file::ptr FetchFile(const char *context, const char *name, const char *webURL, t_filetimestamp acceptableAge, abort_callback &abort)
const char * get_profile_path()
Returns filesystem path to directory with user settings, e.g. file://c:.
string8_fastalloc string_formatter
void set_size(t_size p_size)
t_uint64 t_filetimestamp
Type used for file timestamp related variables. 64-bit value representing the number of 100-nanosecon...