Skip to content

Commit 73bcf46

Browse files
committed
v5.6.15918.0-Beta2
1 parent 39008a8 commit 73bcf46

File tree

71 files changed

+962
-529
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+962
-529
lines changed

Common/Common.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
<Platforms>AnyCPU;x64</Platforms>
1111
</PropertyGroup>
1212
<ItemGroup>
13-
<PackageReference Include="ITHit.FileSystem" Version="5.5.15752.0-Beta2" />
13+
<PackageReference Include="ITHit.FileSystem" Version="5.6.15918.0-Beta2" />
1414
</ItemGroup>
1515
</Project>

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This sample implements a virtual file system with synchronization support, on-de
2020

2121
<a href="https://github.com/ITHit/UserFileSystemSamples/tree/master/macOS">
2222
<p>
23-
This sample implements a virtual file system for Mac with synchronization support and folders on-demand listing.&nbsp;It synchronizes files and folders both from remote storage to the user file system and from the user file system to remote storage. This <span>...</span>
23+
This sample implements a virtual file system for Mac with synchronization support, folders on-demand listing, thumbnails and context menu support.&nbsp;It synchronizes files and folders both from remote storage to the user file system and from the user fi <span>...</span>
2424
</p>
2525
</a>
2626
</li>
@@ -31,7 +31,8 @@ This sample implements a virtual file system for Mac with synchronization suppor
3131

3232
<a href="https://github.com/ITHit/UserFileSystemSamples/tree/master/Windows/VirtualDrive/">
3333
<p>
34-
This is a virtual drive implementation with thumbnail support, Microsoft Office and AutoCAD documents editing support, and automatic Microsoft Office/AutoCAD documents locking. It also demonstrates custom column support in Windows File Manager.&nbsp;To si <span>...</span>
34+
This is a virtual drive implementation with thumbnail support, custom context menu and custom states &amp;amp; columns support. It also demonstrates automatic Microsoft Office/AutoCAD documents locking.&nbsp;
35+
To simulate the remote storage, this sample is usi <span>...</span>
3536
</p>
3637
</a>
3738
</li>

Windows/Common/Core/Common.Windows.Core.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net48;net5.0-windows10.0.19041.0</TargetFrameworks>
3+
<TargetFrameworks>net48;net6.0-windows10.0.19041.0</TargetFrameworks>
44
<Description>Contains functionality common for all Windows Virtual Drive samples.</Description>
55
<Authors>IT Hit LTD.</Authors>
66
<Product>IT Hit User File System</Product>
@@ -20,7 +20,8 @@
2020
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
2121
</ItemGroup>
2222
<ItemGroup>
23-
<PackageReference Include="ITHit.FileSystem.Windows" Version="5.5.15752.0-Beta2" />
23+
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="5.6.15918.0-Beta2" />
24+
<PackageReference Include="ITHit.FileSystem.Windows" Version="5.6.15918.0-Beta2" />
2425
<ProjectReference Include="..\..\..\Common\Common.csproj" />
2526
</ItemGroup>
2627
</Project>

Windows/Common/Core/FsPath.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@ public static FileSystemInfo GetFileSystemItem(string path)
102102
/// <returns>String that represents file or folder attributes or null if the file/folder is not found.</returns>
103103
public static string GetAttString(string path)
104104
{
105-
try
105+
if (WindowsFileSystemItem.TryGetAttributes(path, out FileAttributes? attributes))
106106
{
107-
return PlaceholderItem.GetFileAttributeLetters(File.GetAttributes(path));
107+
return WindowsFileSystemItem.GetFileAttributesString(attributes.Value);
108108
}
109-
catch
109+
else
110110
{
111111
return null;
112112
}

Windows/Common/Core/LogFormatter.cs

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using log4net.Appender;
1212

1313
using ITHit.FileSystem.Windows;
14+
using ITHit.FileSystem.Windows.Package;
1415

1516
namespace ITHit.FileSystem.Samples.Common.Windows
1617
{
@@ -87,12 +88,13 @@ private string ConfigureLogger()
8788
public void PrintEnvironmentDescription()
8889
{
8990
// Log environment description.
90-
log.Info($"\n{"AppID:",-15} {appId}");
91-
log.Info($"\n{"Engine version:",-15} {typeof(IEngine).Assembly.GetName().Version}");
92-
log.Info($"\n{"OS version:",-15} {RuntimeInformation.OSDescription}");
93-
log.Info($"\n{".NET version:",-15} {RuntimeInformation.FrameworkDescription} {IntPtr.Size * 8}bit.");
94-
//log.Info($"\n{"Is UWP:",-15} {PackageRegistrar.IsRunningAsUwp()}");
95-
log.Info($"\n{"Admin mode:",-15} {new System.Security.Principal.WindowsPrincipal(System.Security.Principal.WindowsIdentity.GetCurrent()).IsInRole(System.Security.Principal.WindowsBuiltInRole.Administrator)}");
91+
log.Info($"\n{"AppID:",-25} {appId}");
92+
log.Info($"\n{"Engine version:",-25} {typeof(IEngine).Assembly.GetName().Version}");
93+
log.Info($"\n{"OS version:",-25} {RuntimeInformation.OSDescription}");
94+
log.Info($"\n{".NET version:",-25} {RuntimeInformation.FrameworkDescription} {IntPtr.Size * 8}bit.");
95+
log.Info($"\n{"Package or app identity:",-25} {PackageRegistrar.IsRunningWithIdentity()}");
96+
log.Info($"\n{"Sparse package identity:",-25} {PackageRegistrar.IsRunningWithSparsePackageIdentity()}");
97+
log.Info($"\n{"Elevated mode:",-25} {new System.Security.Principal.WindowsPrincipal(System.Security.Principal.WindowsIdentity.GetCurrent()).IsInRole(System.Security.Principal.WindowsBuiltInRole.Administrator)}");
9698
}
9799

98100
/// <summary>
@@ -113,9 +115,9 @@ public async Task PrintEngineStartInfoAsync(EngineWindows engine)
113115

114116
public async Task PrintEngineEnvironmentDescriptionAsync(EngineWindows engine)
115117
{
116-
log.Info($"\n{"FS root:",-15} {engine.Path}");
117-
log.Info($"\n{"RS root:",-15} {remoteStorageRootPath}");
118-
log.Info($"\n{"AutoLock:",-15} {engine.AutoLock}");
118+
log.Info($"\n{"File system root:",-25} {engine.Path}");
119+
log.Info($"\n{"Remote storage root:",-25} {remoteStorageRootPath}");
120+
log.Info($"\n{"AutoLock:",-25} {engine.AutoLock}");
119121

120122
// Log indexing state. Sync root must be indexed.
121123
await PrintIndexingStateAsync(engine.Path);
@@ -128,17 +130,17 @@ public async Task PrintEngineEnvironmentDescriptionAsync(EngineWindows engine)
128130
private async Task PrintIndexingStateAsync(string path)
129131
{
130132
StorageFolder userFileSystemRootFolder = await StorageFolder.GetFolderFromPathAsync(path);
131-
log.Info($"\n{"Indexed state:",-15} {await userFileSystemRootFolder.GetIndexedStateAsync()}");
133+
log.Info($"\n{"Indexed state:",-25} {await userFileSystemRootFolder.GetIndexedStateAsync()}");
132134
}
133135

134136
/// <summary>
135137
/// Prints console commands.
136138
/// </summary>
137139
public void PrintHelp()
138140
{
139-
log.Info("\n\nPress Esc to unregister file system, delete all files/folders and exit (simulate uninstall).");
141+
log.Info("\n\nPress Esc to unregister file system, delete all files/folders, unregister sparse package, unregister handlers and exit (simulate uninstall).");
140142
log.Info("\nPress Spacebar to exit without unregistering (simulate reboot).");
141-
log.Info("\nPress 'p' to unregister sparse package.");
143+
log.Info("\nPress 'p' to unregister file system, delete all files/folders, developer certificate, unregister sparse package, unregister handlers and exit (simulate full uninstall).");
142144
log.Info("\nPress 'e' to start/stop the Engine and all sync services.");
143145
log.Info("\nPress 's' to start/stop synchronization service.");
144146
log.Info("\nPress 'm' to start/stop remote storage monitor.");
@@ -171,7 +173,7 @@ public void LogDebug(IEngine sender, EngineMessageEventArgs e)
171173
/// <param name="level">Log level.</param>
172174
private void WriteLog(IEngine sender, EngineMessageEventArgs e, log4net.Core.Level level)
173175
{
174-
string att = FsPath.Exists(e.SourcePath) ? FsPath.GetAttString(e.SourcePath) : null;
176+
string att = FsPath.GetAttString(e.TargetPath ?? e.SourcePath);
175177
string process = null;
176178
byte? priorityHint = null;
177179
string fileId = null;
@@ -223,7 +225,7 @@ private void WriteLog(IEngine sender, EngineMessageEventArgs e, log4net.Core.Lev
223225
private static string Format(string date, string process, string priorityHint, string fileId, string remoteStorageId, string componentName, string callerLineNumber, string callerMemberName, string callerFilePath, string message, string sourcePath, string attributes, string targetPath)
224226
{
225227
// {fileId,-18} | {remoteStorageId,-remoteStorageIdWidth}
226-
return $"{Environment.NewLine}|{date, -12}| {process,-25}| {priorityHint,-5}| {componentName,-26}| {callerLineNumber, 4} | {message,-45}| {sourcePath,-sourcePathWidth} | {attributes, 23 } | {targetPath}";
228+
return $"{Environment.NewLine}|{date, -12}| {process,-25}| {priorityHint,-5}| {componentName,-26}| {callerLineNumber, 4} | {message,-45}| {sourcePath,-sourcePathWidth} | {attributes, 10 } | {targetPath}";
227229
}
228230

229231
/// <summary>

Windows/Common/VirtualDrive/Common.Windows.VirtualDrive.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net48;net5.0-windows10.0.19041.0</TargetFrameworks>
3+
<TargetFrameworks>net48;net6.0-windows10.0.19041.0</TargetFrameworks>
44
<Description>Contains functionality common for all Windows Virtual Drive samples.</Description>
55
<Authors>IT Hit LTD.</Authors>
66
<Product>IT Hit User File System</Product>
@@ -9,7 +9,7 @@
99
<Platforms>AnyCPU;x64</Platforms>
1010
</PropertyGroup>
1111
<ItemGroup>
12-
<PackageReference Include="ITHit.FileSystem.Windows" Version="5.5.15752.0-Beta2" />
12+
<PackageReference Include="ITHit.FileSystem.Windows" Version="5.6.15918.0-Beta2" />
1313
<ProjectReference Include="..\..\..\Common\Common.csproj" />
1414
<ProjectReference Include="..\Core\Common.Windows.Core.csproj" />
1515
</ItemGroup>

Windows/Common/VirtualDrive/Filter/AutoCadFilterHelper.cs

Lines changed: 0 additions & 71 deletions
This file was deleted.

Windows/Common/VirtualDrive/Filter/FilterHelper.cs

Lines changed: 0 additions & 63 deletions
This file was deleted.

Windows/Common/VirtualDrive/Filter/MsOfficeFilterHelper.cs

Lines changed: 0 additions & 100 deletions
This file was deleted.

0 commit comments

Comments
 (0)