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()
const char * get_profile_path()
Returns filesystem path to directory with user settings, e.g. file://c:.
void set_size(t_size p_size)