Skip to content

Commit

Permalink
v3.2.8901.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ITHitBuild committed Jun 30, 2021
1 parent b81929b commit 9e4a543
Show file tree
Hide file tree
Showing 46 changed files with 495 additions and 581 deletions.
2 changes: 1 addition & 1 deletion Common/Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<Description>Contains functionality common for all Virtual Drive samples, both for Windows and macOS.</Description>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem" Version="3.1.7115.0-Beta" />
<PackageReference Include="ITHit.FileSystem" Version="3.2.8901.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Common/FileSystemItemMetadataExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace ITHit.FileSystem.Samples.Common
public class FileSystemItemMetadataExt : IFileSystemItemMetadata
{
/// <inheritdoc/>
public string ItemId { get; set; }
public byte[] ItemId { get; set; }

///<inheritdoc/>
public string Name { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions Windows/Common/Common.Windows.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Description>Contains functionality common for all Windows Virtual Drive samples.</Description>
<Authors>IT Hit LTD.</Authors>
<Product>IT Hit User File System</Product>
Expand All @@ -12,7 +12,7 @@
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows" Version="3.1.7115.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="3.2.8901.0" />
<ProjectReference Include="..\..\Common\Common.csproj" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Windows/Common/ETagManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ internal async Task MoveToAsync(string userFileSystemNewPath)
new FileInfo(eTagFileTargetPath).Directory.Create();
if (File.Exists(eTagFilePath))
{
File.Move(eTagFilePath, eTagFileTargetPath);
File.Move(eTagFilePath, eTagFileTargetPath, true);
}

// If this is a folder, move all eTags in this folder.
Expand Down
2 changes: 1 addition & 1 deletion Windows/Common/ExternalDataManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ private async Task CustomColumnsMoveToAsync(string userFileSystemNewPath)

if (File.Exists(customColumnsFilePath))
{
File.Move(customColumnsFilePath, customColumnsFileTargetPath);
File.Move(customColumnsFilePath, customColumnsFileTargetPath, true);
}

// If this is a folder, move all data in this folder.
Expand Down
4 changes: 2 additions & 2 deletions Windows/Common/LockManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ internal async Task MoveToAsync(string userFileSystemNewPath)
new FileInfo(lockInfoFileTargetPath).Directory.Create();
if (File.Exists(lockInfoFilePath))
{
File.Move(lockInfoFilePath, lockInfoFileTargetPath);
File.Move(lockInfoFilePath, lockInfoFileTargetPath, true);
}
if (File.Exists(lockModeFilePath))
{
File.Move(lockModeFilePath, lockModeFileTargetPath);
File.Move(lockModeFilePath, lockModeFileTargetPath, true);
}

// If this is a folder, move all data in this folder.
Expand Down
31 changes: 31 additions & 0 deletions Windows/UserFileSystemSamples.sln
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VirtualDrive.ThumbnailProvi
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VirtualFileSystem", "VirtualFileSystem\VirtualFileSystem.csproj", "{06E5D212-CAD4-4880-832D-69D8D69B8E3D}"
EndProject
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "VirtualDrive.Package", "VirtualDrive\VirtualDrive.Package\VirtualDrive.Package.wapproj", "{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -175,6 +177,34 @@ Global
{06E5D212-CAD4-4880-832D-69D8D69B8E3D}.Release|x64.Build.0 = Release|Any CPU
{06E5D212-CAD4-4880-832D-69D8D69B8E3D}.Release|x86.ActiveCfg = Release|Any CPU
{06E5D212-CAD4-4880-832D-69D8D69B8E3D}.Release|x86.Build.0 = Release|Any CPU
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Debug|Any CPU.ActiveCfg = Debug|x64
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Debug|Any CPU.Build.0 = Debug|x64
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Debug|Any CPU.Deploy.0 = Debug|x64
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Debug|ARM.ActiveCfg = Debug|ARM
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Debug|ARM.Build.0 = Debug|ARM
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Debug|ARM.Deploy.0 = Debug|ARM
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Debug|ARM64.ActiveCfg = Debug|ARM64
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Debug|ARM64.Build.0 = Debug|ARM64
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Debug|ARM64.Deploy.0 = Debug|ARM64
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Debug|x64.ActiveCfg = Debug|x64
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Debug|x64.Build.0 = Debug|x64
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Debug|x64.Deploy.0 = Debug|x64
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Debug|x86.ActiveCfg = Debug|x86
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Debug|x86.Build.0 = Debug|x86
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Debug|x86.Deploy.0 = Debug|x86
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Release|Any CPU.ActiveCfg = Release|x86
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Release|ARM.ActiveCfg = Release|ARM
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Release|ARM.Build.0 = Release|ARM
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Release|ARM.Deploy.0 = Release|ARM
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Release|ARM64.ActiveCfg = Release|ARM64
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Release|ARM64.Build.0 = Release|ARM64
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Release|ARM64.Deploy.0 = Release|ARM64
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Release|x64.ActiveCfg = Release|x64
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Release|x64.Build.0 = Release|x64
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Release|x64.Deploy.0 = Release|x64
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Release|x86.ActiveCfg = Release|x86
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Release|x86.Build.0 = Release|x86
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -184,6 +214,7 @@ Global
{51F6CFCC-AB57-40DD-AADA-6299A2C6B941} = {264745B0-DF86-41E1-B400-3CAA1B403830}
{648FB01F-0C4A-409E-A48A-E6722F626AB8} = {CAE8E8A6-2721-4C90-BCD9-F4B03C3D8F13}
{1E765516-497B-4546-8C38-DB452915ACBF} = {CAE8E8A6-2721-4C90-BCD9-F4B03C3D8F13}
{9CC25823-7D6C-4AAA-95A0-EE0514CCABD9} = {CAE8E8A6-2721-4C90-BCD9-F4B03C3D8F13}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {740A716A-38A7-46BC-A21F-18336D0023B7}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions Windows/VirtualDrive/VirtualDrive.Package/Package.appxmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>

<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
xmlns:desktop3="http://schemas.microsoft.com/appx/manifest/desktop/windows10/3"
xmlns:com="http://schemas.microsoft.com/appx/manifest/com/windows10"
IgnorableNamespaces="uap rescap">

<Identity
Name="38f8ee88-19d0-48a3-ad8e-904a6cf3ca17"
Publisher="CN=VirtualFileSystemPackagePublisher"
Version="1.0.0.0" />

<Properties>
<DisplayName>VirtualDrive.Package</DisplayName>
<PublisherDisplayName>VirtualDrive.PackagePublisher</PublisherDisplayName>
<Logo>Images\StoreLogo.png</Logo>
</Properties>

<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14393.0" MaxVersionTested="10.0.14393.0" />
</Dependencies>

<Resources>
<Resource Language="x-generate"/>
</Resources>

<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="VirtualDrive.Package"
Description="VirtualDrive.Package"
BackgroundColor="transparent"
Square150x150Logo="Images\Square150x150Logo.png"
Square44x44Logo="Images\Square44x44Logo.png">
<uap:DefaultTile Wide310x150Logo="Images\Wide310x150Logo.png" />
<uap:SplashScreen Image="Images\SplashScreen.png" />
</uap:VisualElements>
<Extensions>
<desktop3:Extension Category="windows.cloudFiles">
<desktop3:CloudFiles>
<desktop3:ThumbnailProviderHandler Clsid="05CF065E-E135-4B2B-9D4D-CFB3FBAC73A4"/>
<!--<desktop3:ThumbnailProviderHandler Clsid="b9e1bc83-84ed-4ff6-984b-818f9564a7eb"/>-->
<desktop3:CustomStateHandler Clsid="20000000-0000-0000-0000-000000000001"/>
<desktop3:ExtendedPropertyHandler Clsid="20000000-0000-0000-0000-000000000001"/>
<desktop3:BannersHandler Clsid="20000000-0000-0000-0000-000000000001"/>
<desktop3:CloudFilesContextMenus />
</desktop3:CloudFiles>
</desktop3:Extension>
<com:Extension Category="windows.comServer">
<com:ComServer>
<!-- When changing ProgId make sure to change it also in the ThumbnailProvider.cs -->
<com:SurrogateServer AppId="3000bacb-ea7c-4e37-a939-3b16154da364" DisplayName="VirtualDrive.ThumbnailProvider">
<com:Class Id="05CF065E-E135-4B2B-9D4D-CFB3FBAC73A4" Path="VirtualDrive.ThumbnailProvider\VirtualDrive.ThumbnailProvider.comhost.dll" ThreadingModel="Both" ProgId="VirtualDrive.ThumbnailProvider" />
</com:SurrogateServer>
<com:ProgId Id="VirtualDrive.ThumbnailProvider" Clsid="05CF065E-E135-4B2B-9D4D-CFB3FBAC73A4" />
</com:ComServer>
</com:Extension>
</Extensions>
</Application>
</Applications>

<Capabilities>
<Capability Name="internetClient" />
<rescap:Capability Name="runFullTrust" />
</Capabilities>
</Package>
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '15.0'">
<VisualStudioVersion>15.0</VisualStudioVersion>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x86">
<Configuration>Debug</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x86">
<Configuration>Release</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup>
<WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath>
</PropertyGroup>
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" />
<PropertyGroup>
<ProjectGuid>9cc25823-7d6c-4aaa-95a0-ee0514ccabd9</ProjectGuid>
<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.18362.0</TargetPlatformMinVersion>
<DefaultLanguage>en-US</DefaultLanguage>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
<EntryPointProjectUniqueName>..\VirtualDrive\VirtualDrive.csproj</EntryPointProjectUniqueName>
</PropertyGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
</ItemGroup>
<ItemGroup>
<Content Include="Images\SplashScreen.scale-200.png" />
<Content Include="Images\LockScreenLogo.scale-200.png" />
<Content Include="Images\Square150x150Logo.scale-200.png" />
<Content Include="Images\Square44x44Logo.scale-200.png" />
<Content Include="Images\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Images\StoreLogo.png" />
<Content Include="Images\Wide310x150Logo.scale-200.png" />
</ItemGroup>
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
<ItemGroup>
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.19041.8" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\VirtualDrive.ThumbnailProvider\VirtualDrive.ThumbnailProvider.csproj">
<SkipGetTargetFrameworkProperties>True</SkipGetTargetFrameworkProperties>
<!--<PublishProfile>Properties\PublishProfiles\$(Configuration)_$(Platform).pubxml</PublishProfile>-->
</ProjectReference>
<ProjectReference Include="..\VirtualDrive\VirtualDrive.csproj">
<SkipGetTargetFrameworkProperties>True</SkipGetTargetFrameworkProperties>
</ProjectReference>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
51 changes: 51 additions & 0 deletions Windows/VirtualDrive/VirtualDrive.ThumbnailProvider/Mapping.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
using System;
using System.IO;
using Microsoft.Extensions.Configuration;
using VirtualDrive.ThumbnailProvider.Settings;

namespace VirtualDrive.ThumbnailProvider
{
/// <summary>
/// Maps a user file system path to the remote storage path and back.
/// </summary>
internal static class Mapping
{
private static AppSettings appSettings = ReadAppSettings();

/// <summary>
/// Returns a remote storage URI that corresponds to the user file system path.
/// </summary>
public static string MapPath(string userFileSystemPath)
{
string relativePath = Path.TrimEndingDirectorySeparator(userFileSystemPath).Substring(
Path.TrimEndingDirectorySeparator(appSettings.UserFileSystemRootPath).Length);

string path = $"{Path.TrimEndingDirectorySeparator(appSettings.RemoteStorageRootPath)}{relativePath}";
return path;
}

/// <summary>
/// Reads settings from appsettings.json.
/// </summary>
private static AppSettings ReadAppSettings()
{
string assemblyPath = Path.GetDirectoryName(typeof(Mapping).Assembly.Location);
string path = Path.Combine(assemblyPath, "appsettings.json");
AppSettings settings = new AppSettings();
IConfiguration configuration = new ConfigurationBuilder().AddJsonFile(path, false, true).Build();
configuration.Bind(settings);

// Update settings
if (!Path.IsPathRooted(settings.RemoteStorageRootPath))
{
settings.RemoteStorageRootPath = Path.GetFullPath(Path.Combine(assemblyPath, "..", "VirtualDrive", settings.RemoteStorageRootPath));
}

if (!Directory.Exists(settings.UserFileSystemRootPath))
{
settings.UserFileSystemRootPath = Environment.ExpandEnvironmentVariables(settings.UserFileSystemRootPath);
}
return settings;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace VirtualFileSystem.ThumbnailProvider.Settings
namespace VirtualDrive.ThumbnailProvider.Settings
{
public class AppSettings
{
Expand Down
Loading

0 comments on commit 9e4a543

Please sign in to comment.