mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-23 23:20:05 +01:00
19 lines
668 B
C
19 lines
668 B
C
|
|
#pragma once
|
||
|
|
|
||
|
|
#include <WorkspacesLib/Result.h>
|
||
|
|
#include <WorkspacesLib/WorkspacesData.h>
|
||
|
|
|
||
|
|
namespace JsonUtils
|
||
|
|
{
|
||
|
|
enum class WorkspacesFileError
|
||
|
|
{
|
||
|
|
FileReadingError,
|
||
|
|
IncorrectFileError,
|
||
|
|
};
|
||
|
|
|
||
|
|
Result<WorkspacesData::WorkspacesProject, WorkspacesFileError> ReadSingleWorkspace(const std::wstring& fileName);
|
||
|
|
Result<std::vector<WorkspacesData::WorkspacesProject>, WorkspacesFileError> ReadWorkspaces(const std::wstring& fileName);
|
||
|
|
|
||
|
|
bool Write(const std::wstring& fileName, const std::vector<WorkspacesData::WorkspacesProject>& projects);
|
||
|
|
bool Write(const std::wstring& fileName, const WorkspacesData::WorkspacesProject& project);
|
||
|
|
}
|