Skip to content

Commit

Permalink
v5.5.15752.0-Beta2
Browse files Browse the repository at this point in the history
  • Loading branch information
ITHitBuild committed Jun 21, 2022
1 parent 183402d commit 1a5b7d7
Show file tree
Hide file tree
Showing 47 changed files with 303 additions and 1,297 deletions.
2 changes: 1 addition & 1 deletion Common/Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem" Version="5.0.15216.0-Beta" />
<PackageReference Include="ITHit.FileSystem" Version="5.5.15752.0-Beta2" />
</ItemGroup>
</Project>
51 changes: 1 addition & 50 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1 @@

<h1>User-mode File System Examples for Windows and macOS in .NET/C#</h1>
<div class="description"></div>
<ul class="list">
<li>
<a class="link-header" href="https://github.com/ITHit/UserFileSystemSamples/tree/master/Windows/VirtualFileSystem">
<h2>Virtual File System Sample in .NET, C#</h2>
</a>

<a href="https://github.com/ITHit/UserFileSystemSamples/tree/master/Windows/VirtualFileSystem">
<p>
This sample implements a virtual file system with synchronization support, on-demand loading,&nbsp;selective offline files support, upload and download progress, and error reporting. It synchronizes files and folders both from remote storage to the user f <span>...</span>
</p>
</a>
</li>
<li>
<a class="link-header" href="https://github.com/ITHit/UserFileSystemSamples/tree/master/macOS">
<h2>Virtual File System Sample for Mac in .NET, C#</h2>
</a>

<a href="https://github.com/ITHit/UserFileSystemSamples/tree/master/macOS">
<p>
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>
</p>
</a>
</li>
<li>
<a class="link-header" href="https://github.com/ITHit/UserFileSystemSamples/tree/master/Windows/VirtualDrive/">
<h2>Virtual Drive Sample in .NET, C#</h2>
</a>

<a href="https://github.com/ITHit/UserFileSystemSamples/tree/master/Windows/VirtualDrive/">
<p>
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>
</p>
</a>
</li>
<li>
<a class="link-header" href="https://github.com/ITHit/UserFileSystemSamples/tree/master/Windows/WebDAVDrive/">
<h2>WebDAV Drive Sample in .NET, C#</h2>
</a>

<a href="https://github.com/ITHit/UserFileSystemSamples/tree/master/Windows/WebDAVDrive/">
<p>
This sample implements a virtual file system that displays documents from a WebDAV server. You can edit documents, upload and download documents as well as manage folders structure using Windows File Manager. This sample provides automatic documents <span>...</span>
</p>
</a>
</li>
</ul>

��
2 changes: 1 addition & 1 deletion Windows/Common/Core/Common.Windows.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows" Version="5.0.15216.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="5.5.15752.0-Beta2" />
<ProjectReference Include="..\..\..\Common\Common.csproj" />
</ItemGroup>
</Project>
3 changes: 2 additions & 1 deletion Windows/Common/Core/FsPath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Threading.Tasks;
using Windows.Storage;
using FileAttributes = System.IO.FileAttributes;
using ITHit.FileSystem.Windows;

namespace ITHit.FileSystem.Samples.Common.Windows
{
Expand Down Expand Up @@ -103,7 +104,7 @@ public static string GetAttString(string path)
{
try
{
return Convert.ToString((int)File.GetAttributes(path), 2);
return PlaceholderItem.GetFileAttributeLetters(File.GetAttributes(path));
}
catch
{
Expand Down
17 changes: 10 additions & 7 deletions Windows/Common/Core/LogFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,16 @@ private void WriteLog(IEngine sender, EngineMessageEventArgs e, log4net.Core.Lev
//targetPath = targetPath?.Replace(remoteStorageRootPath, "<RS root>");
//}

string message = Format(DateTimeOffset.Now.ToString("hh:mm:ss.fff"), process, priorityHint?.ToString(), fileId, "", e.ComponentName, e.Message, sourcePath, att, targetPath);
string message = Format(DateTimeOffset.Now.ToString("hh:mm:ss.fff"), process, priorityHint?.ToString(), fileId, "", e.ComponentName, e.CallerLineNumber.ToString(), e.CallerMemberName, e.CallerFilePath, e.Message, sourcePath, att, targetPath);

if (level == log4net.Core.Level.Error)
{
Exception ex = ((EngineErrorEventArgs)e).Exception;
message += Environment.NewLine;
log.Error(message, ex);
if (ex != null)
{
message += Environment.NewLine;
log.Error(message, ex);
}
}
else if (level == log4net.Core.Level.Info)
{
Expand All @@ -217,19 +220,19 @@ private void WriteLog(IEngine sender, EngineMessageEventArgs e, log4net.Core.Lev

}

private static string Format(string date, string process, string priorityHint, string fileId, string remoteStorageId, string componentName, string message, string sourcePath, string attributes, string targetPath)
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)
{
// {fileId,-18} | {remoteStorageId,-remoteStorageIdWidth}
return $"{Environment.NewLine}|{date, -12}| {process,-25}| {priorityHint,-5}| {componentName,-26}| {message,-45}| {sourcePath,-sourcePathWidth} | {attributes, 23 } | {targetPath}";
return $"{Environment.NewLine}|{date, -12}| {process,-25}| {priorityHint,-5}| {componentName,-26}| {callerLineNumber, 4} | {message,-45}| {sourcePath,-sourcePathWidth} | {attributes, 23 } | {targetPath}";
}

/// <summary>
/// Prints logging data headers.
/// </summary>
private void PrintHeader()
{
log.Info(Format("Time", "Process Name", "Prty", "FS ID", "RS ID", "Component", "Message", "Source Path", "Attributes", "Target Path"));
log.Info(Format("----", "------------", "----", "_____", "_____", "---------", "-------", "-----------", "----------", "-----------"));
log.Info(Format("Time", "Process Name", "Prty", "FS ID", "RS ID", "Component", "Line", "Caller Member Name", "Caller File Path", "Message", "Source Path", "Attributes", "Target Path"));
log.Info(Format("----", "------------", "----", "_____", "_____", "---------", "____", "------------------", "----------------", "-------", "-----------", "----------", "-----------"));
}
}

Expand Down
10 changes: 1 addition & 9 deletions Windows/Common/VirtualDrive/Common.Windows.VirtualDrive.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,7 @@
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<ItemGroup>
<Compile Remove="ETagManager.cs" />
<Compile Remove="ExternalDataManager.cs" />
<Compile Remove="FilteredDocsMonitor.cs" />
<Compile Remove="IMapping.cs" />
<Compile Remove="LockManager.cs" />
<Compile Remove="ServerToClientSync.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ITHit.FileSystem.Windows" Version="5.0.15216.0-Beta" />
<PackageReference Include="ITHit.FileSystem.Windows" Version="5.5.15752.0-Beta2" />
<ProjectReference Include="..\..\..\Common\Common.csproj" />
<ProjectReference Include="..\Core\Common.Windows.Core.csproj" />
</ItemGroup>
Expand Down
Loading

0 comments on commit 1a5b7d7

Please sign in to comment.