Files
UnrealEngineUWP/Engine/Source/Developer/Windows/LiveCodingServer/Private/External/LC_FileAttributeCache.h
Jack Porter 9d2ebe90d2 Merging //UE4/Dev-Main to Dev-Mobile (//UE4/Dev-Mobile)
#rb None
#jira 0

[CL 5396125 by Jack Porter in Dev-Mobile branch]
2019-03-14 00:59:16 -04:00

36 lines
624 B
C++

// Copyright 2011-2019 Molecular Matters GmbH, all rights reserved.
#pragma once
#include "CoreTypes.h"
#include "LC_Types.h"
#include "xxhash.h"
class FileAttributeCache
{
struct Hasher
{
inline size_t operator()(const std::wstring& key) const
{
return XXH32(key.c_str(), key.length() * sizeof(wchar_t), 0u);
}
};
public:
struct Data
{
uint64_t lastModificationTime;
bool exists;
};
FileAttributeCache(void);
Data UpdateCacheData(const std::wstring& path);
size_t GetEntryCount(void) const;
private:
typedef types::unordered_map_with_hash<std::wstring, Data, Hasher> Cache;
Cache m_data;
};