forked from microsoft/react-native-code-push
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCodePushUpdateUtils.h
More file actions
38 lines (30 loc) · 1.48 KB
/
CodePushUpdateUtils.h
File metadata and controls
38 lines (30 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#include "winrt/Windows.Data.Json.h"
#include "winrt/Windows.Foundation.h"
#include "winrt/Windows.Storage.h"
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#include <string_view>
namespace Microsoft::CodePush::ReactNative
{
struct CodePushUpdateUtils
{
static constexpr std::wstring_view AssetsFolderName{ L"assets" };
static constexpr std::wstring_view BinaryHashKey{ L"CodePushBinaryHash" };
static constexpr std::wstring_view ManifestFolderPrefix{ L"CodePush" };
static constexpr std::wstring_view BundleJWTFile{ L".codepushrelease" };
static winrt::Windows::Foundation::IAsyncOperation<bool> CopyEntriesInFolderAsync(
winrt::Windows::Storage::StorageFolder& sourceFolder,
winrt::Windows::Storage::StorageFolder& destFolder);
static winrt::Windows::Foundation::IAsyncOperation<winrt::hstring> ModifiedDateStringOfFileAsync(const winrt::Windows::Storage::StorageFile& file);
static winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Storage::StorageFile> GetSignatureFileAsync(
const winrt::Windows::Storage::StorageFolder& rootFolder);
private:
/*
Ignore list for hashing
*/
static constexpr std::wstring_view IgnoreMacOSX{ L"__MACOSX/" };
static constexpr std::wstring_view IgnoreDSStore{ L".DS_Store" };
static constexpr std::wstring_view IgnoreCodePushMetadata{ L".codepushrelease" };
};
}