mirror of
https://github.com/cyanfish/naps2.git
synced 2024-08-16 10:40:35 +03:00
25 lines
565 B
C#
25 lines
565 B
C#
namespace NAPS2.Dependencies;
|
|
|
|
public class ExternalComponent : IExternalComponent
|
|
{
|
|
public ExternalComponent(string id, string path, DownloadInfo downloadInfo)
|
|
{
|
|
Id = id;
|
|
Path = path;
|
|
DownloadInfo = downloadInfo;
|
|
}
|
|
|
|
public string Id { get; }
|
|
|
|
public string Path { get; }
|
|
|
|
public DownloadInfo DownloadInfo { get; }
|
|
|
|
public bool IsInstalled => File.Exists(Path);
|
|
|
|
public void Install(string sourcePath)
|
|
{
|
|
FileSystemHelper.EnsureParentDirExists(Path);
|
|
File.Move(sourcePath, Path);
|
|
}
|
|
} |