mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Code cleanup and fix test running
This commit is contained in:
@ -4,26 +4,25 @@ using Wabbajack.Common;
|
||||
using Wabbajack.Paths;
|
||||
using Wabbajack.Paths.IO;
|
||||
|
||||
namespace Wabbajack.FileExtractor.ExtractedFiles
|
||||
namespace Wabbajack.FileExtractor.ExtractedFiles;
|
||||
|
||||
public class ExtractedNativeFile : NativeFileStreamFactory, IExtractedFile
|
||||
{
|
||||
public class ExtractedNativeFile : NativeFileStreamFactory, IExtractedFile
|
||||
public ExtractedNativeFile(AbsolutePath file, IPath path) : base(file, path)
|
||||
{
|
||||
public ExtractedNativeFile(AbsolutePath file, IPath path) : base(file, path)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public ExtractedNativeFile(AbsolutePath file) : base(file)
|
||||
{
|
||||
}
|
||||
public ExtractedNativeFile(AbsolutePath file) : base(file)
|
||||
{
|
||||
}
|
||||
|
||||
public bool CanMove { get; set; } = true;
|
||||
public bool CanMove { get; set; } = true;
|
||||
|
||||
public async ValueTask Move(AbsolutePath newPath, CancellationToken token)
|
||||
{
|
||||
if (CanMove)
|
||||
await _file.MoveToAsync(newPath, true, token);
|
||||
else
|
||||
await _file.CopyToAsync(newPath, true, token);
|
||||
}
|
||||
public async ValueTask Move(AbsolutePath newPath, CancellationToken token)
|
||||
{
|
||||
if (CanMove)
|
||||
await _file.MoveToAsync(newPath, true, token);
|
||||
else
|
||||
await _file.CopyToAsync(newPath, true, token);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user