}
void FilesystemInstance::FilesystemFetchAllStorages(const picojson::value& args,
- picojson::object& out) {
+ picojson::object& out) {
ScopeLogger();
auto onSuccess = [&](const common::VirtualStorages& result) {
const std::function<void(FilesystemError)>& error_cb);
void FetchAllStorages(const std::function<void(const common::VirtualStorages&)>& success_cb,
- const std::function<void(FilesystemError)>& error_cb);
+ const std::function<void(FilesystemError)>& error_cb);
void CreateFile(const std::string& path,
const std::function<void(const FilesystemStat&)>& success_cb,
var foundVirtualRoot;
var foundVirtualPath;
for (var virtual_root in cacheVirtualToReal) {
- var real_root_path = cacheVirtualToReal[virtual_root].path
- if(_virtualPath.indexOf(real_root_path, 0) === 0) {
+ var real_root_path = cacheVirtualToReal[virtual_root].path;
+ if (_virtualPath.indexOf(real_root_path, 0) === 0) {
var currentLength = real_root_path.length;
- if(currentLength > foundLength) {
- foundLength = currentLength;
- foundVirtualRoot = virtual_root;
- foundVirtualPath = real_root_path
+ if (currentLength > foundLength) {
+ foundLength = currentLength;
+ foundVirtualRoot = virtual_root;
+ foundVirtualPath = real_root_path;
}
}
}
- if(foundLength != 0) {
+ if (foundLength != 0) {
return _virtualPath.replace(foundVirtualPath, foundVirtualRoot);
}
return _virtualPath;