commit
2133ee5aee
@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FileCompare
|
||||||
|
{
|
||||||
|
public abstract class AFileCompare
|
||||||
|
{
|
||||||
|
public AFileCompare(string name)
|
||||||
|
{
|
||||||
|
this.Name = name;
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
using Force.Crc32;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Runtime.Intrinsics.Arm;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FileCompare
|
||||||
|
{
|
||||||
|
public class CRCCompare : AFileCompare
|
||||||
|
{
|
||||||
|
public CRCCompare() : base("CRC")
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Crc32.NET" Version="1.2.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FileCompare
|
||||||
|
{
|
||||||
|
public class FileSizeCompare : AFileCompare
|
||||||
|
{
|
||||||
|
public FileSizeCompare() : base("FileSize_4096")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool CompareCore(string file1, string file2)
|
@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FileCompare
|
||||||
|
{
|
||||||
|
public class FileSizeCompare2 : AFileCompare
|
||||||
|
{
|
||||||
|
public FileSizeCompare2() : base("FileSize_4096_Span")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool CompareCore(string file1, string file2)
|
@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Security.Cryptography;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FileCompare
|
||||||
|
{
|
||||||
|
public class HashCompare : AFileCompare
|
||||||
|
{
|
||||||
|
public HashCompare() : base("Hash256")
|
||||||
|
{
|
||||||
|
}
|
@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Security.Cryptography;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FileCompare
|
||||||
|
{
|
||||||
|
public class MD5Compare : AFileCompare
|
||||||
|
{
|
||||||
|
public MD5Compare() : base("MD5")
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Net.Http.Headers;
|
||||||
|
|
||||||
|
namespace FileCompare
|
||||||
|
{
|
||||||
|
internal class Program
|
||||||
|
{
|
||||||
|
static void Main(string[] args)
|
||||||
|
{
|
||||||
|
var files = new List<(string name, string source, string target)>()
|
||||||
|
{
|
||||||
|
("log",@"C:\Users\coder\Desktop\Logs_20240103.txt",@"C:\Users\coder\Desktop\Logs_20240103 - 副本.txt")
|
||||||
|
};
|
||||||
|
var list = new List<AFileCompare>();
|
Loading…
Reference in new issue