Skip to content

Commit 1172216

Browse files
committed
v9.0.29481.0-Beta
1 parent d846102 commit 1172216

29 files changed

+649
-436
lines changed

Common/Common.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<Compile Remove="FolderMetadataExt.cs" />
1616
</ItemGroup>
1717
<ItemGroup>
18-
<PackageReference Include="ITHit.FileSystem.Windows" Version="9.0.27334.0-Beta" />
19-
<PackageReference Include="ITHit.FileSystem" Version="9.0.27334.0-Beta" />
18+
<PackageReference Include="ITHit.FileSystem.Windows" Version="9.0.29481.0-Beta" />
19+
<PackageReference Include="ITHit.FileSystem" Version="9.0.29481.0-Beta" />
2020
</ItemGroup>
2121
</Project>

Common/Settings.cs

+9
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,14 @@ public class Settings
5151
/// The folder content invalidation period in milliseconds.
5252
/// </summary>
5353
public double FolderInvalidationIntervalMs { get; set; }
54+
55+
/// <summary>
56+
/// Get or set the custom columns for the file system items.
57+
/// </summary>
58+
/// <remarks>
59+
/// Each custom column is represented by an instance of the <see cref="CustomColumn"/> class,
60+
/// which includes an ID and a Name.
61+
/// </remarks>
62+
public Dictionary<int, string> CustomColumns { get; set; }
5463
}
5564
}

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.26100.1742" />
2424
</ItemGroup>
2525
<ItemGroup>
26-
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="9.0.27334.0-Beta" />
27-
<PackageReference Include="ITHit.FileSystem.Windows" Version="9.0.27334.0-Beta" />
26+
<PackageReference Include="ITHit.FileSystem.Windows.Package" Version="9.0.29481.0-Beta" />
27+
<PackageReference Include="ITHit.FileSystem.Windows" Version="9.0.29481.0-Beta" />
2828
<ProjectReference Include="..\..\..\Common\Common.csproj" />
2929
</ItemGroup>
3030
</Project>

Windows/Common/Core/Registrar.cs

+22-13
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,24 @@ public Registrar(ILog log, IEnumerable<(string Name, Guid Guid, bool AlwaysRegis
4747
/// </summary>
4848
/// <param name="displayName">Human readable display name.</param>
4949
/// <param name="iconPath">Path to the drive ico file.</param>
50+
/// <param name="customColumns">
51+
/// A dictionary where the key represents the column ID (an integer) and the value represents the display name of the column (a string).
52+
/// These columns will appear in Windows File Explorer and can display additional metadata for files and folders,
53+
/// such as lock owner, lock expiration date, or custom identifiers.
54+
/// </param>
5055
/// <remarks>
5156
/// In the case of a packaged installer (msix) call this method during first program start.
5257
/// In the case of a regular installer (msi) call this method during installation.
5358
/// </remarks>
54-
public async Task<StorageProviderSyncRootInfo> RegisterSyncRootAsync(string syncRootId, string userFileSystemRootPath, string remotestorageRootPath, string displayName, string iconPath)
59+
public async Task<StorageProviderSyncRootInfo> RegisterSyncRootAsync(string syncRootId, string userFileSystemRootPath, string remotestorageRootPath, string displayName, string iconPath, Dictionary<int, string>? customColumns)
5560
{
5661
StorageProviderSyncRootInfo syncRoot = null;
5762
if (!await IsRegisteredAsync(userFileSystemRootPath))
5863
{
5964
Log.Info($"\n\nRegistering sync root.");
6065
Directory.CreateDirectory(userFileSystemRootPath);
6166

62-
syncRoot = await RegisterAsync(syncRootId, userFileSystemRootPath, remotestorageRootPath, displayName, iconPath);
67+
syncRoot = await RegisterAsync(syncRootId, userFileSystemRootPath, remotestorageRootPath, displayName, iconPath, customColumns);
6368
}
6469
else
6570
{
@@ -293,19 +298,23 @@ private void UnregisterShellExtensions()
293298
/// <param name="remoteStoragePath">Remote storage path. It will be stored inide the sync root to distinguish between sync roots when mounting a new remote storage.</param>
294299
/// <param name="displayName">Human readable display name.</param>
295300
/// <param name="iconPath">Path to the drive ico file.</param>
296-
/// <param name="providerID">Provider ID will be stored in sync root to find if this sync root belongs to this application.</param>
301+
/// <param name="customColumns">
302+
/// A dictionary where the key represents the column ID (an integer) and the value represents the display name of the column (a string).
303+
/// These columns will appear in Windows File Explorer and can display additional metadata for files and folders,
304+
/// such as lock owner, lock expiration date, or custom identifiers.
305+
/// </param>
297306
/// <remarks>
298307
/// In the case of a packaged installer (msix) call this method during first program start.
299308
/// In the case of a regular installer (msi) call this method during installation.
300309
/// </remarks>
301-
private static async Task<StorageProviderSyncRootInfo> RegisterAsync(string syncRootId, string path, string remoteStoragePath, string displayName, string iconPath)
310+
private static async Task<StorageProviderSyncRootInfo> RegisterAsync(string syncRootId, string path, string remoteStoragePath, string displayName, string iconPath, Dictionary<int, string>? customColumns)
302311
{
303312
StorageProviderSyncRootInfo storageInfo = new StorageProviderSyncRootInfo();
304313
storageInfo.Path = await StorageFolder.GetFolderFromPathAsync(path);
305314
storageInfo.Id = syncRootId;
306315
storageInfo.DisplayNameResource = displayName;
307316
storageInfo.IconResource = iconPath;
308-
storageInfo.Version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
317+
storageInfo.Version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
309318
storageInfo.RecycleBinUri = new Uri("https://userfilesystem.com/recyclebin");
310319
storageInfo.SetRemoteStoragePath(remoteStoragePath);
311320
//storageInfo.ProviderId = providerID; // Provider ID is not returned by StorageProviderSyncRootManager.GetCurrentSyncRoots()
@@ -324,14 +333,14 @@ private static async Task<StorageProviderSyncRootInfo> RegisterAsync(string sync
324333
// Adds columns to Windows File Manager.
325334
// Show/hide columns in the "More..." context menu on the columns header in Windows Explorer.
326335
var proDefinitions = storageInfo.StorageProviderItemPropertyDefinitions;
327-
proDefinitions.Add(new StorageProviderItemPropertyDefinition { DisplayNameResource = "Lock Owner" , Id = (int)CustomColumnIds.LockOwnerIcon });
328-
proDefinitions.Add(new StorageProviderItemPropertyDefinition { DisplayNameResource = "Lock Scope" , Id = (int)CustomColumnIds.LockScope });
329-
proDefinitions.Add(new StorageProviderItemPropertyDefinition { DisplayNameResource = "Lock Expires" , Id = (int)CustomColumnIds.LockExpirationDate });
330-
proDefinitions.Add(new StorageProviderItemPropertyDefinition { DisplayNameResource = "Content ETag" , Id = (int)CustomColumnIds.ContentETag });
331-
proDefinitions.Add(new StorageProviderItemPropertyDefinition { DisplayNameResource = "Metadata ETag", Id = (int)CustomColumnIds.MetadataETag });
332-
proDefinitions.Add(new StorageProviderItemPropertyDefinition { DisplayNameResource = "ID" , Id = (int)CustomColumnIds.Id });
333-
334-
336+
if(customColumns != null)
337+
{
338+
foreach (var column in customColumns)
339+
{
340+
proDefinitions.Add(new StorageProviderItemPropertyDefinition { DisplayNameResource = column.Value, Id = column.Key });
341+
}
342+
}
343+
335344
ValidateStorageProviderSyncRootInfo(storageInfo);
336345

337346
StorageProviderSyncRootManager.Register(storageInfo);

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
<Compile Remove="IVirtualFolder.cs" />
1414
</ItemGroup>
1515
<ItemGroup>
16-
<PackageReference Include="ITHit.FileSystem.Windows.AppHelper" Version="9.0.27334.0-Beta" />
17-
<PackageReference Include="ITHit.FileSystem.Windows" Version="9.0.27334.0-Beta" />
16+
<PackageReference Include="ITHit.FileSystem.Windows.AppHelper" Version="9.0.29481.0-Beta" />
17+
<PackageReference Include="ITHit.FileSystem.Windows" Version="9.0.29481.0-Beta" />
1818
<ProjectReference Include="..\..\..\Common\Common.csproj" />
1919
<ProjectReference Include="..\Core\Common.Windows.Core.csproj" />
2020
</ItemGroup>

Windows/Common/VirtualDrive/MenuCommandLock.cs

-154
This file was deleted.

Windows/Common/VirtualDrive/VirtualEngineBase.cs

+17-2
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,21 @@ public override async Task<bool> FilterAsync(SyncDirection direction, OperationT
283283
return true;
284284
}
285285

286+
if (await new FoxitFilter().FilterAsync(direction, operationType, path, itemType, newPath, operationContext))
287+
{
288+
return true;
289+
}
290+
291+
if (await new AutodeskInventorFilter().FilterAsync(direction, operationType, path, itemType, newPath, operationContext))
292+
{
293+
return true;
294+
}
295+
296+
if (await new AutodeskRevitFilter().FilterAsync(direction, operationType, path, itemType, newPath, operationContext))
297+
{
298+
return true;
299+
}
300+
286301
//if (await new ErrorStatusFilter(true).FilterAsync(direction, operationType, path, itemType, newPath, operationContext))
287302
//{
288303
// return true;
@@ -292,9 +307,9 @@ public override async Task<bool> FilterAsync(SyncDirection direction, OperationT
292307
}
293308

294309
/// <inheritdoc/>
295-
public override async Task StartAsync(bool processModified = true, CancellationToken cancellationToken = default)
310+
public override async Task StartAsync(bool processChanges = true, CancellationToken cancellationToken = default)
296311
{
297-
await base.StartAsync(processModified, cancellationToken);
312+
await base.StartAsync(processChanges, cancellationToken);
298313
}
299314

300315
public override async Task StopAsync()

Windows/VirtualDrive/VirtualDrive/Program.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ await registrar.RegisterSyncRootAsync(
143143
Settings.UserFileSystemRootPath,
144144
Settings.RemoteStorageRootPath,
145145
Settings.ProductName,
146-
Path.Combine(Settings.IconsFolderPath, "Drive.ico"));
146+
Path.Combine(Settings.IconsFolderPath, "Drive.ico"), Settings.CustomColumns);
147147

148148
using (Engine = new VirtualEngine(
149149
Settings.UserFileSystemLicense,

0 commit comments

Comments
 (0)