Skip to content

Commit

Permalink
v7.1.23216.0-Beta
Browse files Browse the repository at this point in the history
  • Loading branch information
ITHitBuild committed Jul 24, 2023
1 parent d01af8b commit b52a20d
Show file tree
Hide file tree
Showing 63 changed files with 1,005 additions and 977 deletions.
4 changes: 2 additions & 2 deletions Common/Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows" Version="7.0.22362.0-Beta" />
<PackageReference Include="ITHit.FileSystem" Version="7.0.22362.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="7.1.23216.0-Beta" />
<PackageReference Include="ITHit.FileSystem" Version="7.1.23216.0-Beta" />
</ItemGroup>
</Project>
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,30 @@ This sample implements a virtual file system for macOS that displays documents f
</p>
</a>
</li>
<li>
<a class="link-header" href="https://www.userfilesystem.com/examples/mac_troubleshooting/">
<h2>File Provider Extension Troubleshooting on macOS</h2>
</a>

<a href="https://www.userfilesystem.com/examples/mac_troubleshooting/">
<p>
If you experience issues on application start it may be caused by an incorrect app configuration. You can find what may be wrong using a macOS Console:

If your application started successfully but you experience issues with the file system you may n <span>...</span>
</p>
</a>
</li>
<li>
<a class="link-header" href="https://www.userfilesystem.com/examples/apple_deployment/">
<h2>macOS File Provider Extension Projects Deployment </h2>
</a>

<a href="https://www.userfilesystem.com/examples/apple_deployment/">
<p>
To deploy macOS project in a production environment you will need to create&nbsp;Group ID, App Identifies and Provisioning Profiles.
Note that these steps are NOT required for development. Sample project provided with the library run out of the box in the <span>...</span>
</p>
</a>
</li>
</ul>

4 changes: 2 additions & 2 deletions Windows/Common/Core/Common.Windows.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="7.0.22362.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="7.0.22362.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="7.1.23216.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="7.1.23216.0-Beta" />
<ProjectReference Include="..\..\..\Common\Common.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<Compile Remove="IVirtualFolder.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows" Version="7.0.22362.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="7.1.23216.0-Beta" />
<ProjectReference Include="..\..\..\Common\Common.csproj" />
<ProjectReference Include="..\Core\Common.Windows.Core.csproj" />
</ItemGroup>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows.ShellExtension" Version="7.0.22362.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows.ShellExtension" Version="7.1.23216.0-Beta" />
</ItemGroup>
<ItemGroup>
<None Update="log4net.config">
Expand Down
2 changes: 1 addition & 1 deletion Windows/VirtualDrive/VirtualDrive/VirtualDrive.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ This is an advanced project with ETags support, Microsoft Office documents editi
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="7.0.22362.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="7.1.23216.0-Beta" />
<ProjectReference Include="..\..\..\Common\Common.csproj" />
<ProjectReference Include="..\..\Common\VirtualDrive\Common.Windows.VirtualDrive.csproj" />
</ItemGroup>
Expand Down
15 changes: 8 additions & 7 deletions Windows/VirtualDrive/VirtualDrive/VirtualEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

using ITHit.FileSystem;
using ITHit.FileSystem.Samples.Common.Windows;

using ITHit.FileSystem.Windows;

namespace VirtualDrive
{
Expand All @@ -30,19 +30,20 @@ public class VirtualEngine : VirtualEngineBase
/// <param name="iconsFolderPath">Path to the icons folder.</param>
/// <param name="logFormatter">Logger.</param>
public VirtualEngine(
string license,
string userFileSystemRootPath,
string remoteStorageRootPath,
string iconsFolderPath,
string license,
string userFileSystemRootPath,
string remoteStorageRootPath,
string iconsFolderPath,
LogFormatter logFormatter)
: base(license, userFileSystemRootPath, remoteStorageRootPath, iconsFolderPath, logFormatter)
{
RemoteStorageMonitor = new RemoteStorageMonitor(remoteStorageRootPath, this, this.Logger);
}

/// <inheritdoc/>
public override async Task<IFileSystemItem> GetFileSystemItemAsync(string userFileSystemPath, FileSystemItemType itemType, byte[] remoteStorageItemId, ILogger logger = null)
public override async Task<IFileSystemItem> GetFileSystemItemAsync(byte[] remoteStorageItemId, FileSystemItemType itemType, IContext context, ILogger logger = null)
{
string userFileSystemPath = (context as IContextWindows).Path;
if (itemType == FileSystemItemType.File)
{
return new VirtualFile(userFileSystemPath, remoteStorageItemId, this, logger);
Expand All @@ -55,7 +56,7 @@ public override async Task<IFileSystemItem> GetFileSystemItemAsync(string userFi


/// <inheritdoc/>
public override async Task<IMenuCommand> GetMenuCommandAsync(Guid menuGuid)
public override async Task<IMenuCommand> GetMenuCommandAsync(Guid menuGuid, IOperationContext operationContext = null)
{
// For this method to be called you need to register a menu command handler.
// See method description for more details.
Expand Down
13 changes: 3 additions & 10 deletions Windows/VirtualDrive/VirtualDrive/VirtualFileSystemItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace VirtualDrive
{
///<inheritdoc>
public abstract class VirtualFileSystemItem : IFileSystemItem, ILock
public abstract class VirtualFileSystemItem : IFileSystemItemWindows, ILock
{
/// <summary>
/// File or folder path in the user file system.
Expand Down Expand Up @@ -152,7 +152,7 @@ public async Task DeleteCompletionAsync(IOperationContext operationContext, IInS
}

/// <inheritdoc/>
public async Task<byte[]> GetThumbnailAsync(uint size)
public async Task<byte[]> GetThumbnailAsync(uint size, IOperationContext operationContext = null)
{
// For this method to be called you need to register a thumbnail handler.
// See method description for more details.
Expand All @@ -169,7 +169,7 @@ public async Task<byte[]> GetThumbnailAsync(uint size)


/// <inheritdoc/>
public async Task<IEnumerable<FileSystemItemPropertyData>> GetPropertiesAsync()
public async Task<IEnumerable<FileSystemItemPropertyData>> GetPropertiesAsync(IOperationContext operationContext = null)
{
// For this method to be called you need to register a properties handler.
// See method description for more details.
Expand Down Expand Up @@ -227,13 +227,6 @@ public async Task<IEnumerable<FileSystemItemPropertyData>> GetPropertiesAsync()
}


///<inheritdoc>
public Task<IFileSystemItemMetadata> GetMetadataAsync()
{
// Return IFileMetadata for a file, IFolderMetadata for a folder.
throw new NotImplementedException();
}

///<inheritdoc>
public async Task LockAsync(LockMode lockMode, IOperationContext operationContext = null, CancellationToken cancellationToken = default)
{
Expand Down
2 changes: 1 addition & 1 deletion Windows/VirtualFileSystem/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static async Task Main(string[] args)
// Set the remote storage item ID for the root item. It will be passed to the IEngine.GetFileSystemItemAsync()
// method as a remoteStorageItemId parameter when a root folder is requested.
byte[] itemId = WindowsFileSystemItem.GetItemIdByPath(Settings.RemoteStorageRootPath);
Engine.Placeholders.GetRootItem().SetRemoteStorageItemId(itemId);
Engine.SetRemoteStorageRootItemId(itemId);

// Print console commands.
consoleProcessor.PrintHelp();
Expand Down
5 changes: 3 additions & 2 deletions Windows/VirtualFileSystem/VirtualEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ public override async Task<bool> FilterAsync(SyncDirection direction, OperationT
}

/// <inheritdoc/>
public override async Task<IFileSystemItem> GetFileSystemItemAsync(string userFileSystemPath, FileSystemItemType itemType, byte[] remoteStorageItemId = null, ILogger logger = null)
public override async Task<IFileSystemItem> GetFileSystemItemAsync(byte[] remoteStorageItemId, FileSystemItemType itemType, IContext context, ILogger logger = null)
{
string userFileSystemPath = (context as IContextWindows).Path;
if (itemType == FileSystemItemType.File)
{
return new VirtualFile(userFileSystemPath, remoteStorageItemId, logger);
Expand All @@ -90,7 +91,7 @@ public override async Task<IFileSystemItem> GetFileSystemItemAsync(string userFi
}

/// <inheritdoc/>
public override async Task<IMenuCommand> GetMenuCommandAsync(Guid menuGuid)
public override async Task<IMenuCommand> GetMenuCommandAsync(Guid menuGuid, IOperationContext operationContext = null)
{
// For this method to be called you need to register a menu command handler.
// See method description for more details.
Expand Down
15 changes: 4 additions & 11 deletions Windows/VirtualFileSystem/VirtualFileSystemItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

using ITHit.FileSystem;
using ITHit.FileSystem.Samples.Common.Windows;

using ITHit.FileSystem.Windows;

namespace VirtualFileSystem
{
///<inheritdoc>
public abstract class VirtualFileSystemItem : IFileSystemItem
public abstract class VirtualFileSystemItem : IFileSystemItemWindows
{
/// <summary>
/// File or folder path in the user file system.
Expand Down Expand Up @@ -148,7 +148,7 @@ public async Task DeleteCompletionAsync(IOperationContext operationContext = nul


///<inheritdoc/>
public Task<byte[]> GetThumbnailAsync(uint size)
public Task<byte[]> GetThumbnailAsync(uint size, IOperationContext operationContext = null)
{
// For this method to be called you need to register a thumbnail handler.
// See method description for more details.
Expand All @@ -157,19 +157,12 @@ public Task<byte[]> GetThumbnailAsync(uint size)
}

/// <inheritdoc/>
public async Task<IEnumerable<FileSystemItemPropertyData>> GetPropertiesAsync()
public async Task<IEnumerable<FileSystemItemPropertyData>> GetPropertiesAsync(IOperationContext operationContext = null)
{
// For this method to be called you need to register a properties handler.
// See method description for more details.

throw new NotImplementedException();
}

///<inheritdoc/>
public Task<IFileSystemItemMetadata> GetMetadataAsync()
{
// Return IFileMetadata for a file, IFolderMetadata for a folder.
throw new NotImplementedException();
}
}
}
18 changes: 13 additions & 5 deletions Windows/WebDAVDrive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,23 @@
<li>The sample supports WebDAV servers with cookies authentication, Basic, Digest, NTLM, and Kerberos authentication.</li>
<li>To connect to WebDAV servers with cookies authentication Microsoft Edge&nbsp;is required.&nbsp;</li>
</ul>
<h2>Configuring the Sample</h2>
<p>To specify the WebDAV server URL edit the&nbsp;<code class="code">"WebDAVServerUrl"</code>&nbsp;<span>parameter in</span>&nbsp;<code class="code">appsettings.json</code>. This could be either a server root path (https://server/) or a WebDAV folder on your server (https://server/dav/).</p>
<p>For testing and demo purposes you can use one of the IT Hit demo servers. Navigate to https://webdavserver.net or to https://webdavserver.com in a web browser. Copy the URL or your test folder, that looks like https://webdavserver.net/User123456/ and specify it in the&nbsp;<code class="code">WebDAVServerUrl</code>&nbsp;parameter.</p>
<p>By default, this sample will mount the user file system under the&nbsp;<code class="code">%USERPROFILE%\DAV\</code>&nbsp;folder (typically&nbsp;<code class="code">C:\Users\&lt;username&gt;\DAV\</code>). To specify a different folder edit the&nbsp;<code class="code">"UserFileSystemRootPath"</code>&nbsp;<span>parameter in</span>&nbsp;<code class="code">appsettings.json</code>.</p>
<h2>Setting the License</h2>
<h2>Setting License</h2>
<p><span class="warn">Note that to use the sample you need both the IT Hit WebDAV Client Library license and IT Hit User File System license.</span></p>
<p>To run the example, you will need both IT Hit WebDAV Client Library for .NET license and IT Hit User File System Engine for .NET License. You can download <span>a trial license in the&nbsp;<a title="Download" href="https://www.webdavsystem.com/client/download/">IT Hit WebDAV Client Library product download area</a>&nbsp;and in the&nbsp;<a title="Download" href="https://www.userfilesystem.com/download/">IT Hit User File System&nbsp;</a></span><a title="Download" href="https://www.userfilesystem.com/download/">product download area</a>.&nbsp;Note that this sample is fully functional with a trial license and does not have any limitations. The trial licenses are valid for one month will stop working after this. You can check the expiration date inside the license file.&nbsp;Download the licenses file and specify license strings in the&nbsp;<span><code class="code">WebDAVClientLicense</code> and&nbsp;<code class="code">UserFileSystemLicense</code></span>&nbsp;fields respectively in&nbsp;<code class="code">appsettings.json</code>&nbsp;file.&nbsp;Set the license content directly as a value (NOT as a path to the license file). Do not forget to escape quotes: \":</p>
<pre class="brush:xml;auto-links:false;toolbar:false">"UserFileSystemLicense": "&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;&lt;License…</pre>
<p>You can also run the sample&nbsp;without explicitly specifying a license&nbsp;for 5 days. In this case,&nbsp;the&nbsp;Engine will automatically request the trial licenses from the IT Hit website https://www.userfilesystem.com. Make sure it is accessible via firewalls if any. After 5 days the Engine will stop working. To extend the trial period you will need to download trial licenses&nbsp;and specify them in&nbsp;<code class="code">appsettings.json</code></p>
<h2>Setting WebDAV Server URL</h2>
<p>To specify the WebDAV server URL edit the&nbsp;<code class="code">"WebDAVServerUrl"</code>&nbsp;parameter in&nbsp;<code class="code">appsettings.json</code>. This could be either a server root path (https://server/) or a WebDAV folder on your server (https://server/dav/).</p>
<p>For testing and demo purposes you can use one of the IT Hit demo servers. Navigate to https://webdavserver.net or to https://webdavserver.com in a web browser. Copy the URL or your test folder, that looks like https://webdavserver.net/User123456/ and specify it in the&nbsp;<code class="code">WebDAVServerUrl</code>&nbsp;parameter.</p>
<pre class="brush:html;auto-links:false;toolbar:false">"WebDAVServerUrl": "https://webdavserver.net/User123456",</pre>
<h2>Setting Web Sockets Server URL</h2>
<p>The client application receives notifications from server about changes via web sockets. To specify your web sockets server URL&nbsp;edit the&nbsp;<code class="code">"WebSocketServerUrl"</code>&nbsp;parameter in&nbsp;<code class="code">appsettings.json</code>.</p>
<p>In case you are using IT Hit demo servers, you will specify the demo server root, without user folder: wss://webdavserver.net or wss://webdavserver.com.&nbsp;</p>
<pre class="brush:html;auto-links:false;toolbar:false">"WebSocketServerUrl": "wss://webdavserver.net"</pre>
<h2>Setting User File System Root Folder</h2>
<p>By default, this sample will mount the user file system under the&nbsp;<code class="code">%USERPROFILE%\DAV\</code>&nbsp;folder (typically&nbsp;<code class="code">C:\Users\&lt;username&gt;\DAV\</code>). To specify a different folder edit the&nbsp;<code class="code">"UserFileSystemRootPath"</code>&nbsp;parameter in&nbsp;<code class="code">appsettings.json</code>.</p>
<pre class="brush:html;auto-links:false;toolbar:false">"UserFileSystemRootPath": "%USERPROFILE%\\DAVv7\\",</pre>
<p>Note that this folder must be indexed, otherwise the file system may not work as expected. This is a Microsoft Windows API requirement for cloud file systems.</p>
<h2>Running the Sample</h2>
<p>To run the sample open the WebDAVDrive project in Visual Studio and run the project in debug mode.&nbsp;In the debug mode this sample provides additional support for the development and testing convenience. When starting in the debug mode, it will automatically create a folder where the virtual file system will reside, register the user file system with the platform and then open&nbsp;an instance of Windows File Manager with a mounted file system as well as will launch a default web browser navigating to the WebDAV server URL specified in your&nbsp;<code class="code">appsettings.json</code>:</p>
<p><img id="__mcenew" alt="WebDAV Drive sample launches Windows File manager with mounted virtual file system displaying content of your WebDAV server" src="https://www.userfilesystem.com/media/2103/mapdrivesample1.png" rel="121895"></p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Copyright>IT HIT LTD.</Copyright>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows.ShellExtension" Version="7.0.22362.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows.ShellExtension" Version="7.1.23216.0-Beta" />
</ItemGroup>
<ItemGroup>
<None Update="log4net.config">
Expand Down
Loading

0 comments on commit b52a20d

Please sign in to comment.