in ProjectedFSLib.Managed.API/VirtualizationInstance.cpp [798:850]
HResult VirtualizationInstance::WritePlaceholderInfo(String^ relativePath,
DateTime creationTime,
DateTime lastAccessTime,
DateTime lastWriteTime,
DateTime changeTime,
FileAttributes fileAttributes,
long long endOfFile,
bool isDirectory,
array<Byte>^ contentId,
array<Byte>^ providerId)
{
if (relativePath == nullptr)
{
return HResult::InvalidArg;
}
if (m_apiHelper->UseBetaApi)
{
std::shared_ptr<PRJ_PLACEHOLDER_INFORMATION> fileInformation = CreatePlaceholderInformation(creationTime,
lastAccessTime,
lastWriteTime,
changeTime,
fileAttributes,
isDirectory ? 0 : endOfFile,
isDirectory,
contentId,
providerId);
pin_ptr<const WCHAR> path = PtrToStringChars(relativePath);
return static_cast<HResult>(m_apiHelper->_PrjWritePlaceholderInformation(reinterpret_cast<PRJ_VIRTUALIZATIONINSTANCE_HANDLE>(m_virtualizationContext),
path,
fileInformation.get(),
sizeof(PRJ_PLACEHOLDER_INFORMATION)));
}
else
{
std::shared_ptr<PRJ_PLACEHOLDER_INFO> placeholderInfo = CreatePlaceholderInfo(creationTime,
lastAccessTime,
lastWriteTime,
changeTime,
fileAttributes,
isDirectory ? 0 : endOfFile,
isDirectory,
contentId,
providerId);
pin_ptr<const WCHAR> path = PtrToStringChars(relativePath);
return static_cast<HResult>(m_apiHelper->_PrjWritePlaceholderInfo(m_virtualizationContext,
path,
placeholderInfo.get(),
sizeof(PRJ_PLACEHOLDER_INFO)));
}
}