2016-02-08 15:55:52 -08:00
|
|
|
/* Copyright 2016 Realm Inc - All Rights Reserved
|
2015-11-23 22:05:06 -08:00
|
|
|
* Proprietary and Confidential
|
|
|
|
*/
|
|
|
|
|
2016-02-08 15:55:52 -08:00
|
|
|
#pragma once
|
2015-11-23 22:05:06 -08:00
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
2016-01-12 03:01:06 +00:00
|
|
|
extern std::string s_default_realm_directory;
|
2015-11-23 22:05:06 -08:00
|
|
|
|
2016-01-12 03:01:06 +00:00
|
|
|
namespace realm {
|
2015-11-23 22:05:06 -08:00
|
|
|
//
|
|
|
|
// These methods are used internally and must be implemented
|
2016-02-08 15:55:52 -08:00
|
|
|
// separately for each platform
|
2015-11-23 22:05:06 -08:00
|
|
|
//
|
|
|
|
|
2016-02-08 15:55:52 -08:00
|
|
|
// set the directory where realm files should be stored
|
|
|
|
void set_default_realm_file_directory(std::string dir);
|
2016-01-11 09:42:26 -08:00
|
|
|
|
2016-02-08 15:55:52 -08:00
|
|
|
// return the directory in which realm files can/should be written to
|
2015-11-23 22:05:06 -08:00
|
|
|
std::string default_realm_file_directory();
|
|
|
|
|
|
|
|
// create the directories for the given filename
|
|
|
|
void ensure_directory_exists_for_file(const std::string &file);
|
|
|
|
|
2016-02-08 15:55:52 -08:00
|
|
|
// remove all realm files in the given directory
|
2015-11-29 19:09:17 -08:00
|
|
|
void remove_realm_files_from_directory(const std::string &directory);
|
2015-11-23 22:05:06 -08:00
|
|
|
|
|
|
|
}
|