diff --git a/src/Tgstation.Server.Host/Components/Deployment/HardLinkDmbProvider.cs b/src/Tgstation.Server.Host/Components/Deployment/HardLinkDmbProvider.cs
index 634af753f4..cd9a3f1185 100644
--- a/src/Tgstation.Server.Host/Components/Deployment/HardLinkDmbProvider.cs
+++ b/src/Tgstation.Server.Host/Components/Deployment/HardLinkDmbProvider.cs
@@ -40,19 +40,19 @@ namespace Tgstation.Server.Host.Components.Deployment
///
/// The for the .
/// The for the .
- /// The for the .
+ /// The for the .
/// The value of .
/// The for the .
public HardLinkDmbProvider(
IDmbProvider baseProvider,
IIOManager ioManager,
- ISymlinkFactory symlinkFactory,
+ IFilesystemLinkFactory linkFactory,
ILogger logger,
GeneralConfiguration generalConfiguration)
: base(
baseProvider,
ioManager,
- symlinkFactory)
+ linkFactory)
{
this.logger = logger ?? throw new ArgumentNullException(nameof(logger));
cancellationTokenSource = new CancellationTokenSource();
@@ -214,7 +214,7 @@ namespace Tgstation.Server.Host.Components.Deployment
using var lockContext = semaphore != null
? await SemaphoreSlimContext.Lock(semaphore, cancellationToken)
: null;
- await SymlinkFactory.CreateHardLink(sourceFile, destFile, cancellationToken);
+ await LinkFactory.CreateHardLink(sourceFile, destFile, cancellationToken);
}
yield return LinkThisFile();
diff --git a/src/Tgstation.Server.Host/Components/Deployment/SwappableDmbProvider.cs b/src/Tgstation.Server.Host/Components/Deployment/SwappableDmbProvider.cs
index b82f5cc676..b00ba3d518 100644
--- a/src/Tgstation.Server.Host/Components/Deployment/SwappableDmbProvider.cs
+++ b/src/Tgstation.Server.Host/Components/Deployment/SwappableDmbProvider.cs
@@ -42,9 +42,9 @@ namespace Tgstation.Server.Host.Components.Deployment
protected IIOManager IOManager { get; }
///
- /// The to use.
+ /// The to use.
///
- protected ISymlinkFactory SymlinkFactory { get; }
+ protected IFilesystemLinkFactory LinkFactory { get; }
///
/// Backing field for .
@@ -56,12 +56,12 @@ namespace Tgstation.Server.Host.Components.Deployment
///
/// The value of .
/// The value of .
- /// The value of .
- public SwappableDmbProvider(IDmbProvider baseProvider, IIOManager ioManager, ISymlinkFactory symlinkFactory)
+ /// The value of .
+ public SwappableDmbProvider(IDmbProvider baseProvider, IIOManager ioManager, IFilesystemLinkFactory symlinkFactory)
{
BaseProvider = baseProvider ?? throw new ArgumentNullException(nameof(baseProvider));
IOManager = ioManager ?? throw new ArgumentNullException(nameof(ioManager));
- SymlinkFactory = symlinkFactory ?? throw new ArgumentNullException(nameof(symlinkFactory));
+ LinkFactory = symlinkFactory ?? throw new ArgumentNullException(nameof(symlinkFactory));
}
///
diff --git a/src/Tgstation.Server.Host/Components/Deployment/SymlinkDmbProvider.cs b/src/Tgstation.Server.Host/Components/Deployment/SymlinkDmbProvider.cs
index 7e0845b95c..2edc58d37e 100644
--- a/src/Tgstation.Server.Host/Components/Deployment/SymlinkDmbProvider.cs
+++ b/src/Tgstation.Server.Host/Components/Deployment/SymlinkDmbProvider.cs
@@ -15,12 +15,12 @@ namespace Tgstation.Server.Host.Components.Deployment
///
/// The for the .
/// The for the .
- /// The for the .
+ /// The for the .
public SymlinkDmbProvider(
IDmbProvider baseProvider,
IIOManager ioManager,
- ISymlinkFactory symlinkFactory)
- : base(baseProvider, ioManager, symlinkFactory)
+ IFilesystemLinkFactory linkFactory)
+ : base(baseProvider, ioManager, linkFactory)
{
}
@@ -30,12 +30,12 @@ namespace Tgstation.Server.Host.Components.Deployment
///
protected override async Task DoSwap(CancellationToken cancellationToken)
{
- if (SymlinkFactory.SymlinkedDirectoriesAreDeletedAsFiles)
+ if (LinkFactory.SymlinkedDirectoriesAreDeletedAsFiles)
await IOManager.DeleteFile(LiveGameDirectory, cancellationToken);
else
await IOManager.DeleteDirectory(LiveGameDirectory, cancellationToken);
- await SymlinkFactory.CreateSymbolicLink(
+ await LinkFactory.CreateSymbolicLink(
IOManager.ResolvePath(BaseProvider.Directory),
IOManager.ResolvePath(LiveGameDirectory),
cancellationToken);
diff --git a/src/Tgstation.Server.Host/Components/InstanceFactory.cs b/src/Tgstation.Server.Host/Components/InstanceFactory.cs
index 8c7a8df85e..a3c7ba2192 100644
--- a/src/Tgstation.Server.Host/Components/InstanceFactory.cs
+++ b/src/Tgstation.Server.Host/Components/InstanceFactory.cs
@@ -66,9 +66,9 @@ namespace Tgstation.Server.Host.Components
readonly ISynchronousIOManager synchronousIOManager;
///
- /// The for the .
+ /// The for the .
///
- readonly ISymlinkFactory symlinkFactory;
+ readonly IFilesystemLinkFactory linkFactory;
///
/// The for the .
@@ -173,7 +173,7 @@ namespace Tgstation.Server.Host.Components
/// The value of .
/// The value of .
/// The value of .
- /// The value of .
+ /// The value of .
/// The value of .
/// The value of .
/// The value of .
@@ -199,7 +199,7 @@ namespace Tgstation.Server.Host.Components
ITopicClientFactory topicClientFactory,
ICryptographySuite cryptographySuite,
ISynchronousIOManager synchronousIOManager,
- ISymlinkFactory symlinkFactory,
+ IFilesystemLinkFactory linkFactory,
IByondInstaller byondInstaller,
IChatManagerFactory chatFactory,
IProcessExecutor processExecutor,
@@ -225,7 +225,7 @@ namespace Tgstation.Server.Host.Components
this.topicClientFactory = topicClientFactory ?? throw new ArgumentNullException(nameof(topicClientFactory));
this.cryptographySuite = cryptographySuite ?? throw new ArgumentNullException(nameof(cryptographySuite));
this.synchronousIOManager = synchronousIOManager ?? throw new ArgumentNullException(nameof(synchronousIOManager));
- this.symlinkFactory = symlinkFactory ?? throw new ArgumentNullException(nameof(symlinkFactory));
+ this.linkFactory = linkFactory ?? throw new ArgumentNullException(nameof(linkFactory));
this.byondInstaller = byondInstaller ?? throw new ArgumentNullException(nameof(byondInstaller));
this.chatFactory = chatFactory ?? throw new ArgumentNullException(nameof(chatFactory));
this.processExecutor = processExecutor ?? throw new ArgumentNullException(nameof(processExecutor));
@@ -275,7 +275,7 @@ namespace Tgstation.Server.Host.Components
var configuration = new StaticFiles.Configuration(
configurationIoManager,
synchronousIOManager,
- symlinkFactory,
+ linkFactory,
processExecutor,
postWriteHandler,
platformIdentifier,
diff --git a/src/Tgstation.Server.Host/Components/StaticFiles/Configuration.cs b/src/Tgstation.Server.Host/Components/StaticFiles/Configuration.cs
index 087503d68c..eeb5cd71c6 100644
--- a/src/Tgstation.Server.Host/Components/StaticFiles/Configuration.cs
+++ b/src/Tgstation.Server.Host/Components/StaticFiles/Configuration.cs
@@ -94,9 +94,9 @@ namespace Tgstation.Server.Host.Components.StaticFiles
readonly ISynchronousIOManager synchronousIOManager;
///
- /// The for .
+ /// The for .
///
- readonly ISymlinkFactory symlinkFactory;
+ readonly IFilesystemLinkFactory linkFactory;
///
/// The for .
@@ -153,7 +153,7 @@ namespace Tgstation.Server.Host.Components.StaticFiles
///
/// The value of .
/// The value of .
- /// The value of .
+ /// The value of .
/// The value of .
/// The value of .
/// The value of .
@@ -164,7 +164,7 @@ namespace Tgstation.Server.Host.Components.StaticFiles
public Configuration(
IIOManager ioManager,
ISynchronousIOManager synchronousIOManager,
- ISymlinkFactory symlinkFactory,
+ IFilesystemLinkFactory linkFactory,
IProcessExecutor processExecutor,
IPostWriteHandler postWriteHandler,
IPlatformIdentifier platformIdentifier,
@@ -175,7 +175,7 @@ namespace Tgstation.Server.Host.Components.StaticFiles
{
this.ioManager = ioManager ?? throw new ArgumentNullException(nameof(ioManager));
this.synchronousIOManager = synchronousIOManager ?? throw new ArgumentNullException(nameof(synchronousIOManager));
- this.symlinkFactory = symlinkFactory ?? throw new ArgumentNullException(nameof(symlinkFactory));
+ this.linkFactory = linkFactory ?? throw new ArgumentNullException(nameof(linkFactory));
this.processExecutor = processExecutor ?? throw new ArgumentNullException(nameof(processExecutor));
this.postWriteHandler = postWriteHandler ?? throw new ArgumentNullException(nameof(postWriteHandler));
this.platformIdentifier = platformIdentifier ?? throw new ArgumentNullException(nameof(platformIdentifier));
@@ -450,7 +450,7 @@ namespace Tgstation.Server.Host.Components.StaticFiles
var fileExists = await fileExistsTask;
if (fileExists)
await ioManager.DeleteFile(destPath, cancellationToken);
- await symlinkFactory.CreateSymbolicLink(ioManager.ResolvePath(file), ioManager.ResolvePath(destPath), cancellationToken);
+ await linkFactory.CreateSymbolicLink(ioManager.ResolvePath(file), ioManager.ResolvePath(destPath), cancellationToken);
}));
}
diff --git a/src/Tgstation.Server.Host/Components/Watchdog/AdvancedWatchdog.cs b/src/Tgstation.Server.Host/Components/Watchdog/AdvancedWatchdog.cs
index 07954e5a88..48d2b3e254 100644
--- a/src/Tgstation.Server.Host/Components/Watchdog/AdvancedWatchdog.cs
+++ b/src/Tgstation.Server.Host/Components/Watchdog/AdvancedWatchdog.cs
@@ -35,9 +35,9 @@ namespace Tgstation.Server.Host.Components.Watchdog
protected IIOManager GameIOManager { get; }
///
- /// The for the .
+ /// The for the .
///
- protected ISymlinkFactory SymlinkFactory { get; }
+ protected IFilesystemLinkFactory LinkFactory { get; }
///
/// of s that are waiting to clean up old deployments.
@@ -68,7 +68,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
/// The for the .
/// The for the .
/// The value of .
- /// The value of .
+ /// The value of .
/// The for the .
/// The for the .
/// The for the .
@@ -85,7 +85,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
IEventConsumer eventConsumer,
IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory,
IIOManager gameIOManager,
- ISymlinkFactory symlinkFactory,
+ IFilesystemLinkFactory linkFactory,
ILogger logger,
DreamDaemonLaunchParameters initialLaunchParameters,
Api.Models.Instance instance,
@@ -109,7 +109,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
try
{
GameIOManager = gameIOManager ?? throw new ArgumentNullException(nameof(gameIOManager));
- SymlinkFactory = symlinkFactory ?? throw new ArgumentNullException(nameof(symlinkFactory));
+ LinkFactory = linkFactory ?? throw new ArgumentNullException(nameof(linkFactory));
deploymentCleanupTasks = new List();
}
diff --git a/src/Tgstation.Server.Host/Components/Watchdog/PosixWatchdog.cs b/src/Tgstation.Server.Host/Components/Watchdog/PosixWatchdog.cs
index 961fee9988..eb563bd1fa 100644
--- a/src/Tgstation.Server.Host/Components/Watchdog/PosixWatchdog.cs
+++ b/src/Tgstation.Server.Host/Components/Watchdog/PosixWatchdog.cs
@@ -42,7 +42,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
/// The for the .
/// The for the .
/// The pointing to the game directory for the ..
- /// The for the .
+ /// The for the .
/// The for the .
/// The for the .
/// The for the .
@@ -60,7 +60,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
IEventConsumer eventConsumer,
IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory,
IIOManager gameIOManager,
- ISymlinkFactory symlinkFactory,
+ IFilesystemLinkFactory linkFactory,
ILogger logger,
DreamDaemonLaunchParameters initialLaunchParameters,
Api.Models.Instance instance,
@@ -78,7 +78,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
eventConsumer,
remoteDeploymentManagerFactory,
gameIOManager,
- symlinkFactory,
+ linkFactory,
logger,
initialLaunchParameters,
instance,
@@ -93,6 +93,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
///
protected override SwappableDmbProvider CreateSwappableDmbProvider(IDmbProvider dmbProvider)
- => new HardLinkDmbProvider(dmbProvider, GameIOManager, SymlinkFactory, Logger, generalConfiguration);
+ => new HardLinkDmbProvider(dmbProvider, GameIOManager, LinkFactory, Logger, generalConfiguration);
}
}
diff --git a/src/Tgstation.Server.Host/Components/Watchdog/PosixWatchdogFactory.cs b/src/Tgstation.Server.Host/Components/Watchdog/PosixWatchdogFactory.cs
index 787127a05c..64c8672262 100644
--- a/src/Tgstation.Server.Host/Components/Watchdog/PosixWatchdogFactory.cs
+++ b/src/Tgstation.Server.Host/Components/Watchdog/PosixWatchdogFactory.cs
@@ -29,21 +29,21 @@ namespace Tgstation.Server.Host.Components.Watchdog
/// The for the .
/// The for the .
/// The for the .
- /// The for the .
+ /// The for the .
/// The for for the .
public PosixWatchdogFactory(
IServerControl serverControl,
ILoggerFactory loggerFactory,
IJobManager jobManager,
IAsyncDelayer asyncDelayer,
- ISymlinkFactory symlinkFactory,
+ IFilesystemLinkFactory linkFactory,
IOptions generalConfigurationOptions)
: base(
serverControl,
loggerFactory,
jobManager,
asyncDelayer,
- symlinkFactory,
+ linkFactory,
generalConfigurationOptions)
{
}
@@ -72,7 +72,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
eventConsumer,
remoteDeploymentManagerFactory,
gameIOManager,
- SymlinkFactory,
+ LinkFactory,
LoggerFactory.CreateLogger(),
settings,
instance,
diff --git a/src/Tgstation.Server.Host/Components/Watchdog/WindowsWatchdog.cs b/src/Tgstation.Server.Host/Components/Watchdog/WindowsWatchdog.cs
index d882296b06..05c1f10088 100644
--- a/src/Tgstation.Server.Host/Components/Watchdog/WindowsWatchdog.cs
+++ b/src/Tgstation.Server.Host/Components/Watchdog/WindowsWatchdog.cs
@@ -35,7 +35,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
/// The for the .
/// The for the .
/// The pointing to the game directory for the ..
- /// The for the .
+ /// The for the .
/// The for the .
/// The for the .
/// The for the .
@@ -52,7 +52,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
IEventConsumer eventConsumer,
IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory,
IIOManager gameIOManager,
- ISymlinkFactory symlinkFactory,
+ IFilesystemLinkFactory linkFactory,
ILogger logger,
DreamDaemonLaunchParameters initialLaunchParameters,
Api.Models.Instance instance,
@@ -69,7 +69,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
eventConsumer,
remoteDeploymentManagerFactory,
gameIOManager,
- symlinkFactory,
+ linkFactory,
logger,
initialLaunchParameters,
instance,
@@ -85,6 +85,6 @@ namespace Tgstation.Server.Host.Components.Watchdog
///
protected override SwappableDmbProvider CreateSwappableDmbProvider(IDmbProvider dmbProvider)
- => new SymlinkDmbProvider(dmbProvider, GameIOManager, SymlinkFactory);
+ => new SymlinkDmbProvider(dmbProvider, GameIOManager, LinkFactory);
}
}
diff --git a/src/Tgstation.Server.Host/Components/Watchdog/WindowsWatchdogFactory.cs b/src/Tgstation.Server.Host/Components/Watchdog/WindowsWatchdogFactory.cs
index 4cbe20577e..89ed6b145d 100644
--- a/src/Tgstation.Server.Host/Components/Watchdog/WindowsWatchdogFactory.cs
+++ b/src/Tgstation.Server.Host/Components/Watchdog/WindowsWatchdogFactory.cs
@@ -23,9 +23,9 @@ namespace Tgstation.Server.Host.Components.Watchdog
class WindowsWatchdogFactory : WatchdogFactory
{
///
- /// The for the .
+ /// The for the .
///
- protected ISymlinkFactory SymlinkFactory { get; }
+ protected IFilesystemLinkFactory LinkFactory { get; }
///
/// Initializes a new instance of the class.
@@ -34,14 +34,14 @@ namespace Tgstation.Server.Host.Components.Watchdog
/// The for the .
/// The for the .
/// The for the .
- /// The value of .
+ /// The value of .
/// The for for the .
public WindowsWatchdogFactory(
IServerControl serverControl,
ILoggerFactory loggerFactory,
IJobManager jobManager,
IAsyncDelayer asyncDelayer,
- ISymlinkFactory symlinkFactory,
+ IFilesystemLinkFactory symlinkFactory,
IOptions generalConfigurationOptions)
: base(
serverControl,
@@ -50,7 +50,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
asyncDelayer,
generalConfigurationOptions)
{
- SymlinkFactory = symlinkFactory ?? throw new ArgumentNullException(nameof(symlinkFactory));
+ LinkFactory = symlinkFactory ?? throw new ArgumentNullException(nameof(symlinkFactory));
}
///
@@ -77,7 +77,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
eventConsumer,
remoteDeploymentManagerFactory,
gameIOManager,
- SymlinkFactory,
+ LinkFactory,
LoggerFactory.CreateLogger(),
settings,
instance,
diff --git a/src/Tgstation.Server.Host/Core/Application.cs b/src/Tgstation.Server.Host/Core/Application.cs
index ed1cb97cad..18abdcacf3 100644
--- a/src/Tgstation.Server.Host/Core/Application.cs
+++ b/src/Tgstation.Server.Host/Core/Application.cs
@@ -336,7 +336,7 @@ namespace Tgstation.Server.Host.Core
{
AddWatchdog(services, postSetupServices);
services.AddSingleton();
- services.AddSingleton();
+ services.AddSingleton();
services.AddSingleton();
services.AddSingleton();
services.AddSingleton();
@@ -349,7 +349,7 @@ namespace Tgstation.Server.Host.Core
{
AddWatchdog(services, postSetupServices);
services.AddSingleton();
- services.AddSingleton();
+ services.AddSingleton();
services.AddSingleton();
services.AddSingleton();
diff --git a/src/Tgstation.Server.Host/IO/ISymlinkFactory.cs b/src/Tgstation.Server.Host/IO/IFilesystemLinkFactory.cs
similarity index 97%
rename from src/Tgstation.Server.Host/IO/ISymlinkFactory.cs
rename to src/Tgstation.Server.Host/IO/IFilesystemLinkFactory.cs
index 08320a3d15..3cf0622801 100644
--- a/src/Tgstation.Server.Host/IO/ISymlinkFactory.cs
+++ b/src/Tgstation.Server.Host/IO/IFilesystemLinkFactory.cs
@@ -6,7 +6,7 @@ namespace Tgstation.Server.Host.IO
///
/// For creating filesystem symbolic links.
///
- interface ISymlinkFactory
+ interface IFilesystemLinkFactory
{
///
/// If directory symlinks must be deleted as files would in the current environment.
diff --git a/src/Tgstation.Server.Host/IO/PosixSymlinkFactory.cs b/src/Tgstation.Server.Host/IO/PosixFilesystemLinkFactory.cs
similarity index 92%
rename from src/Tgstation.Server.Host/IO/PosixSymlinkFactory.cs
rename to src/Tgstation.Server.Host/IO/PosixFilesystemLinkFactory.cs
index 05d64a3bf0..b80af9e122 100644
--- a/src/Tgstation.Server.Host/IO/PosixSymlinkFactory.cs
+++ b/src/Tgstation.Server.Host/IO/PosixFilesystemLinkFactory.cs
@@ -8,9 +8,9 @@ using Mono.Unix;
namespace Tgstation.Server.Host.IO
{
///
- /// for posix systems.
+ /// for POSIX systems.
///
- sealed class PosixSymlinkFactory : ISymlinkFactory
+ sealed class PosixFilesystemLinkFactory : IFilesystemLinkFactory
{
///
public bool SymlinkedDirectoriesAreDeletedAsFiles => true;
diff --git a/src/Tgstation.Server.Host/IO/WindowsSymlinkFactory.cs b/src/Tgstation.Server.Host/IO/WindowsFilesystemLinkFactory.cs
similarity index 92%
rename from src/Tgstation.Server.Host/IO/WindowsSymlinkFactory.cs
rename to src/Tgstation.Server.Host/IO/WindowsFilesystemLinkFactory.cs
index 864242d992..1513f4e166 100644
--- a/src/Tgstation.Server.Host/IO/WindowsSymlinkFactory.cs
+++ b/src/Tgstation.Server.Host/IO/WindowsFilesystemLinkFactory.cs
@@ -9,9 +9,9 @@ using Tgstation.Server.Host.System;
namespace Tgstation.Server.Host.IO
{
///
- /// for windows systems.
+ /// for windows systems.
///
- sealed class WindowsSymlinkFactory : ISymlinkFactory
+ sealed class WindowsFilesystemLinkFactory : IFilesystemLinkFactory
{
///
public bool SymlinkedDirectoriesAreDeletedAsFiles => false;
diff --git a/tests/Tgstation.Server.Host.Tests/Components/StaticFiles/TestConfiguration.cs b/tests/Tgstation.Server.Host.Tests/Components/StaticFiles/TestConfiguration.cs
index 68241988d1..ff3bd0b5b8 100644
--- a/tests/Tgstation.Server.Host.Tests/Components/StaticFiles/TestConfiguration.cs
+++ b/tests/Tgstation.Server.Host.Tests/Components/StaticFiles/TestConfiguration.cs
@@ -47,7 +47,7 @@ namespace Tgstation.Server.Host.Components.StaticFiles.Tests
var configuration = new Configuration(
ioManager,
new SynchronousIOManager(),
- Mock.Of(),
+ Mock.Of(),
Mock.Of(),
Mock.Of(),
Mock.Of(),
diff --git a/tests/Tgstation.Server.Host.Tests/IO/TestSymlinkFactory.cs b/tests/Tgstation.Server.Host.Tests/IO/TestFilesystemLinkFactory.cs
similarity index 80%
rename from tests/Tgstation.Server.Host.Tests/IO/TestSymlinkFactory.cs
rename to tests/Tgstation.Server.Host.Tests/IO/TestFilesystemLinkFactory.cs
index 27646a9dc7..e735c48541 100644
--- a/tests/Tgstation.Server.Host.Tests/IO/TestSymlinkFactory.cs
+++ b/tests/Tgstation.Server.Host.Tests/IO/TestFilesystemLinkFactory.cs
@@ -8,17 +8,17 @@ using System.Threading.Tasks;
namespace Tgstation.Server.Host.IO.Tests
{
[TestClass]
- public sealed class TestSymlinkFactory
+ public sealed class TestFilesystemLinkFactory
{
- static ISymlinkFactory symlinkFactory;
+ static IFilesystemLinkFactory linkFactory;
[ClassInitialize]
public static void SelectFactory(TestContext _)
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
- symlinkFactory = new WindowsSymlinkFactory();
+ linkFactory = new WindowsFilesystemLinkFactory();
else
- symlinkFactory = new PosixSymlinkFactory();
+ linkFactory = new PosixFilesystemLinkFactory();
}
public static bool HasPermissionToMakeSymlinks()
@@ -43,10 +43,10 @@ namespace Tgstation.Server.Host.IO.Tests
f2 = f1 + ".linked";
File.WriteAllText(f1, Text);
- await Assert.ThrowsExceptionAsync(() => symlinkFactory.CreateSymbolicLink(null, null, default));
- await Assert.ThrowsExceptionAsync(() => symlinkFactory.CreateSymbolicLink(f1, null, default));
+ await Assert.ThrowsExceptionAsync(() => linkFactory.CreateSymbolicLink(null, null, default));
+ await Assert.ThrowsExceptionAsync(() => linkFactory.CreateSymbolicLink(f1, null, default));
- await symlinkFactory.CreateSymbolicLink(f1, f2, default);
+ await linkFactory.CreateSymbolicLink(f1, f2, default);
Assert.IsTrue(File.Exists(f2));
var f2Contents = File.ReadAllText(f2);
@@ -76,10 +76,10 @@ namespace Tgstation.Server.Host.IO.Tests
var p1 = Path.Combine(f1, FileName);
File.WriteAllText(p1, Text);
- await Assert.ThrowsExceptionAsync(() => symlinkFactory.CreateSymbolicLink(null, null, default));
- await Assert.ThrowsExceptionAsync(() => symlinkFactory.CreateSymbolicLink(f1, null, default));
+ await Assert.ThrowsExceptionAsync(() => linkFactory.CreateSymbolicLink(null, null, default));
+ await Assert.ThrowsExceptionAsync(() => linkFactory.CreateSymbolicLink(f1, null, default));
- await symlinkFactory.CreateSymbolicLink(f1, f2, default);
+ await linkFactory.CreateSymbolicLink(f1, f2, default);
var p2 = Path.Combine(f2, FileName);
Assert.IsTrue(File.Exists(p2));
@@ -104,7 +104,7 @@ namespace Tgstation.Server.Host.IO.Tests
try
{
- await symlinkFactory.CreateSymbolicLink(BadPath, BadPath, default);
+ await linkFactory.CreateSymbolicLink(BadPath, BadPath, default);
Assert.Fail("No exception thrown!");
}
catch { }
diff --git a/tests/Tgstation.Server.Host.Tests/IO/TestIOManager.cs b/tests/Tgstation.Server.Host.Tests/IO/TestIOManager.cs
index 5e34e809dc..00319f4f30 100644
--- a/tests/Tgstation.Server.Host.Tests/IO/TestIOManager.cs
+++ b/tests/Tgstation.Server.Host.Tests/IO/TestIOManager.cs
@@ -42,9 +42,9 @@ namespace Tgstation.Server.Host.IO.Tests
[TestMethod]
public async Task TestDeleteDirectoryWithSymlinkInsideDoesntRecurse()
{
- var linkFactory = (ISymlinkFactory)(new PlatformIdentifier().IsWindows
- ? new WindowsSymlinkFactory()
- : new PosixSymlinkFactory());
+ var linkFactory = (IFilesystemLinkFactory)(new PlatformIdentifier().IsWindows
+ ? new WindowsFilesystemLinkFactory()
+ : new PosixFilesystemLinkFactory());
var tempPath = Path.GetTempFileName();
File.Delete(tempPath);
diff --git a/tests/Tgstation.Server.Host.Tests/System/TestSymlinkFactory.cs b/tests/Tgstation.Server.Host.Tests/System/TestSymlinkFactory.cs
index 8e488f11b0..4d3c5be749 100644
--- a/tests/Tgstation.Server.Host.Tests/System/TestSymlinkFactory.cs
+++ b/tests/Tgstation.Server.Host.Tests/System/TestSymlinkFactory.cs
@@ -12,9 +12,9 @@ namespace Tgstation.Server.Host.System.Tests
[TestClass]
public sealed class TestSymlinkFactory
{
- readonly ISymlinkFactory factory = new PlatformIdentifier().IsWindows
- ? new WindowsSymlinkFactory()
- : new PosixSymlinkFactory();
+ readonly IFilesystemLinkFactory factory = new PlatformIdentifier().IsWindows
+ ? new WindowsFilesystemLinkFactory()
+ : new PosixFilesystemLinkFactory();
[TestMethod]
public async Task TestSymlinks()