// Copyright (c) Wojciech Figat. All rights reserved.
#pragma once
#include "Engine/Core/Types/String.h"
#include "Engine/Core/Types/StringView.h"
#include "Engine/Core/Types/Guid.h"
struct AssetInfo;
///
/// Helper class for loading/saving Json file resources
///
class FLAXENGINE_API JsonStorageProxy
{
public:
///
/// Determines whether the specified extension can be a json resource file.
///
/// The path.
/// True if can be a json resource extension, otherwise false.
static bool IsValidExtension(const StringView& extension);
///
/// Find asset info by path
///
/// Asset path
/// Asset ID
/// Asset data TypeName
/// True if found any asset, otherwise false.
static bool GetAssetInfo(const StringView& path, Guid& resultId, String& resultDataTypeName);
///
/// Changes asset ID.
///
/// Asset path
/// Asset ID to set
/// True if found any asset, otherwise false.
static bool ChangeId(const StringView& path, const Guid& newId);
};