Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ obj/
riderModule.iml
/.idea/
/.vs/
/_ReSharper.Caches/
/_ReSharper.Caches/
.idea
Binary file removed WinAVFS.CLI/7z_amd64.dll
Binary file not shown.
Binary file removed WinAVFS.CLI/7z_x86.dll
Binary file not shown.
21 changes: 0 additions & 21 deletions WinAVFS.CLI/Program.cs

This file was deleted.

35 changes: 0 additions & 35 deletions WinAVFS.CLI/Properties/AssemblyInfo.cs

This file was deleted.

71 changes: 0 additions & 71 deletions WinAVFS.CLI/WinAVFS.CLI.csproj

This file was deleted.

33 changes: 0 additions & 33 deletions WinAVFS.Core/ConcurrentObjectPool.cs

This file was deleted.

7 changes: 0 additions & 7 deletions WinAVFS.Core/FSTree.cs

This file was deleted.

12 changes: 0 additions & 12 deletions WinAVFS.Core/IArchiveProvider.cs

This file was deleted.

76 changes: 0 additions & 76 deletions WinAVFS.Core/SevenZipProvider.cs

This file was deleted.

20 changes: 0 additions & 20 deletions WinAVFS.Core/WinAVFS.Core.csproj

This file was deleted.

45 changes: 45 additions & 0 deletions WinAvfs.Cli/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using DokanNet;
using DokanNet.Logging;
using WinAvfs.Core;

namespace WinAvfs.CLI
{
public abstract class Program
{
public static void Main(string[] args)
{
if (args.Length != 2)
{
Console.WriteLine(@"Usage: WinAVFS.CLI.exe <path to archive> <mount point>");
Console.WriteLine(@"Example: WinAVFS.CLI.exe D:\1.zip Z:\");
return;
}

var pathToArchive = args[0];
var mountPoint = args[1];

var provider = new ZipArchiveProvider(pathToArchive);

var mre = new ManualResetEvent(false);
var dokanLogger = new NullLogger();
using var dokan = new Dokan(dokanLogger);
Console.CancelKeyPress += (_, e) =>
{
e.Cancel = true;
mre.Set();
};

var sampleFs = new ReadOnlyAvfs(provider, provider.ReadFsTree());
var dokanBuilder = new DokanInstanceBuilder(dokan)
.ConfigureOptions(options =>
{
options.Options = DokanOptions.WriteProtection | DokanOptions.MountManager;
options.MountPoint = mountPoint;
});
using (dokanBuilder.Build(sampleFs))
{
mre.WaitOne();
}
}
}
}
24 changes: 24 additions & 0 deletions WinAvfs.Cli/WinAvfs.Cli.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>WinAvfs.Cli</AssemblyName>
<RootNamespace>WinAvfs.Cli</RootNamespace>
<IsTestProject>false</IsTestProject>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<IsPackable>true</IsPackable>
<PackAsTool>true</PackAsTool>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Company>WinAvfs</Company>
<Product>Cli</Product>
<Description>Nuget package of 'Cli' provided by WinAvfs</Description>
<PackageId>WinAvfs.Cli</PackageId>
<PackageTags>nuget package dotnet csproj dependencies</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\WinAvfs.Core\WinAvfs.Core.csproj" />
<None Include="..\README.md" Pack="true" PackagePath="." />
</ItemGroup>
</Project>
7 changes: 7 additions & 0 deletions WinAvfs.Core/FSTree.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace WinAvfs.Core
{
public class FsTree
{
public FsTreeNode Root { get; set; }
}
}
Loading