ShellBoost

Cloud Folder Proxy sample

Source repository: https://github.com/aelyo-softworks/ShellBoost-Samples

A .NET 5 Console application that uses WinFSP - Windows File System Proxy to create a virtual Windows drive/directory over the Cloud Folder Site backend. It demonstrates a customized Shell Namespace Extension over this drive or directory, that sees its items and folders as it were physical items and folders. This sample is loadable in its own Visual Studio solution ShellBoost.Samples.CloudFolderProxy.sln. WinFSP must be installed before the sample can be compiled and run.

The sample needs Windows 10 version 1709 (or “Fall Creators Update”) or higher only to display the special “Status” column (the same OneDrive uses).

It needs ShellBoost 1.8.1.0 or higher and is composed of two projects:

A .NET 5 Console application (“Cloud Folder Proxy”). This application implements a ShellBoost Namespace Extension and a WinFSP virtual drive in the same project.

An ASP.NET Core Web application (“Cloud Folder Site”). This application uses SQL Server or a Windows NTFS path as a storage backend.

Optionally, a .NET Core Winforms application (“Cloud Folder Client”) demonstrated in the Cloud Folder sample chapter. This is only used for tests.

Here is the sample’s technical architecture and demonstrated features:

Cloud Folder Proxy sample - Picture 128

Installation

Server-side installation is the same as for the Cloud Folder sample.

Running the sample

To test the sample:

Run the Web Site project, choose an implementation if the program asks for one.

Run the “Cloud Folder Proxy” application, run it.

You can also use the Winforms application (“Cloud Folder Client”) which is very easy to use and talks to the back-end site using the web API.

If everything went well, you should see the files from the backend shown:

In the “Samples.CloudFolder” namespace extension;

In the virtual drive/folder that WinFSP proxies. The virtual drive is by default located at <MyDocuments>\CloudFolderProxy.

Cloud Folder namespace extension:

This extension declares additional columns. Here we can see the standard “Status” column (the same as what OneDrive uses) and a custom “Cache Info” one (not displayed by default, you must add it using a right-click on the view’s header) specific to the sample, that tells us how much of the backend file is present locally. The samples caches local files in chunks. The chunks are automatically created when any application access a file. For example, the Shell will read chunks for image files to display thumbnail or to extract metadata from it as show with the .heic image file in the following screenshot.

Running the sample - Picture 129

Also note the standard “Status” column is visible in all views (Tiles, Icons, etc.):

Running the sample - Picture 47

The sample also adds a “Cloud Folder” context menu item on all files in the view. This sub menus allows the end-user to delete the local cache or to fill it with a copy of the backend file. Note in the sample this context menu does nothing on folders.

Running the sample - Picture 130

Cloud Folder Proxy (WinFSP) folder:

By default, the local path is located at <MyDocuments>\CloudFolderProxy. It should display the exact same files as the Shell Namespace Extension.

Running the sample - Picture 131