ScopeLogger();
CHECK_PRIVILEGE_ACCESS(kPrivilegeFilesystemWrite, &out);
CHECK_EXIST(args, "location", out)
-
const std::string& location = args.get("location").get<std::string>();
+ CHECK_STORAGE_ACCESS(location, &out);
auto onSuccess = [&](const FilesystemStat& data) {
ScopeLogger("Entered into asynchronous function, onSuccess");
ScopeLogger();
CHECK_PRIVILEGE_ACCESS(kPrivilegeFilesystemWrite, &out);
CHECK_EXIST(args, "callbackId", out)
+
CHECK_EXIST(args, "oldPath", out)
+ const std::string& oldPath = args.get("oldPath").get<std::string>();
+ CHECK_STORAGE_ACCESS(oldPath, &out);
CHECK_EXIST(args, "newPath", out)
+ const std::string& newPath = args.get("newPath").get<std::string>();
+ CHECK_STORAGE_ACCESS(newPath, &out);
double callback_id = args.get("callbackId").get<double>();
- const std::string& oldPath = args.get("oldPath").get<std::string>();
- const std::string& newPath = args.get("newPath").get<std::string>();
auto onSuccess = [this, callback_id](const FilesystemStat& data) {
ScopeLogger("Entered into asynchronous function, onSuccess");
void FilesystemInstance::FileStat(const picojson::value& args, picojson::object& out) {
ScopeLogger();
CHECK_PRIVILEGE_ACCESS(kPrivilegeFilesystemRead, &out);
- CHECK_EXIST(args, "callbackId", out)
CHECK_EXIST(args, "location", out)
+ const std::string& location = args.get("location").get<std::string>();
+ CHECK_STORAGE_ACCESS(location, &out);
+ CHECK_EXIST(args, "callbackId", out)
double callback_id = args.get("callbackId").get<double>();
- const std::string& location = args.get("location").get<std::string>();
auto onSuccess = [this, callback_id](const FilesystemStat& data) {
ScopeLogger("Entered into asynchronous function, onSuccess");
ScopeLogger();
CHECK_PRIVILEGE_ACCESS(kPrivilegeFilesystemRead, &out);
CHECK_EXIST(args, "location", out)
-
const std::string& location = args.get("location").get<std::string>();
+ CHECK_STORAGE_ACCESS(location, &out);
auto onSuccess = [&](const FilesystemStat& data) {
ScopeLogger("Entered into asynchronous function, onSuccess");
ScopeLogger();
CHECK_PRIVILEGE_ACCESS(kPrivilegeFilesystemWrite, &out);
CHECK_EXIST(args, "location", out)
-
const std::string& location = args.get("location").get<std::string>();
+ CHECK_STORAGE_ACCESS(location, &out);
auto onResult = [&](FilesystemError e) {
ScopeLogger("Entered into asynchronous function, onResult");
ScopeLogger();
CHECK_PRIVILEGE_ACCESS(kPrivilegeFilesystemWrite, &out);
CHECK_EXIST(args, "pathToFile", out)
-
double callback_id = args.get("callbackId").get<double>();
const std::string& pathToFile = args.get("pathToFile").get<std::string>();
+ CHECK_STORAGE_ACCESS(pathToFile, &out);
auto onSuccess = [this, callback_id]() {
ScopeLogger("Entered into asynchronous function, onSuccess");
ScopeLogger();
CHECK_PRIVILEGE_ACCESS(kPrivilegeFilesystemWrite, &out);
CHECK_EXIST(args, "pathToDelete", out)
-
double callback_id = args.get("callbackId").get<double>();
const std::string& pathToDelete = args.get("pathToDelete").get<std::string>();
+ CHECK_STORAGE_ACCESS(pathToDelete, &out);
auto onSuccess = [this, callback_id]() {
ScopeLogger("Entered into asynchronous function, onSuccess");
ScopeLogger();
CHECK_PRIVILEGE_ACCESS(kPrivilegeFilesystemWrite, &out);
CHECK_EXIST(args, "callbackId", out)
+
CHECK_EXIST(args, "originFilePath", out)
+ const std::string& originPath = args.get("originFilePath").get<std::string>();
+ CHECK_STORAGE_ACCESS(originPath, &out);
CHECK_EXIST(args, "destinationFilePath", out)
+ const std::string& destinationPath = args.get("destinationFilePath").get<std::string>();
+ CHECK_STORAGE_ACCESS(destinationPath, &out);
+
CHECK_EXIST(args, "overwrite", out)
double callback_id = args.get("callbackId").get<double>();
- const std::string& originPath = args.get("originFilePath").get<std::string>();
- const std::string& destinationPath = args.get("destinationFilePath").get<std::string>();
const bool& overwrite = args.get("overwrite").get<bool>();
auto onSuccess = [this, callback_id]() {