Allow setting root folder in LocalFileSystemHandler #183

Closed
opened 2025-12-29 14:24:34 +01:00 by adam · 7 comments
Owner

Originally created by @muzammilkm on GitHub (Jun 20, 2019).

Exapnding LocalFileSystemHandler by taking root path for admin mapping, can help reuse LocalFileSystemHandler.

A constructor taking root path & we can set overloaded to settings.FileSystemHandler

private readonly string _rootFolder;

LocalFileSystemHandler()
{
    rootFolder = Directory.GetCurrentDirectory();
}

LocalFileSystemHandler(string rootFolder)
{
    _rootFolder = rootFolder;
}

Changes in GetMappingFolder

public string GetMappingFolder()
{
   return Path.Combine(_rootFolder, AdminMappingsFolder);
}
Originally created by @muzammilkm on GitHub (Jun 20, 2019). Exapnding LocalFileSystemHandler by taking root path for admin mapping, can help reuse LocalFileSystemHandler. A constructor taking root path & we can set overloaded to settings.FileSystemHandler ``` c# private readonly string _rootFolder; LocalFileSystemHandler() { rootFolder = Directory.GetCurrentDirectory(); } LocalFileSystemHandler(string rootFolder) { _rootFolder = rootFolder; } ``` Changes in GetMappingFolder ``` c# public string GetMappingFolder() { return Path.Combine(_rootFolder, AdminMappingsFolder); } ```
adam added the featurequestion labels 2025-12-29 14:24:34 +01:00
adam closed this issue 2025-12-29 14:24:35 +01:00
Author
Owner

@StefH commented on GitHub (Jun 20, 2019):

You can try preview:
WireMock.Net.1.0.21-ci-11468

@StefH commented on GitHub (Jun 20, 2019): You can try preview: WireMock.Net.1.0.21-ci-11468
Author
Owner

@StefH commented on GitHub (Jun 20, 2019):

BTW I see that you have added a NuGet WireMock, this is done because of above request ?

@StefH commented on GitHub (Jun 20, 2019): BTW I see that you have added a NuGet `WireMock`, this is done because of above request ?
Author
Owner

@muzammilkm commented on GitHub (Jun 20, 2019):

BTW I see that you have added a NuGet WireMock, this is done because of above request ?

No, that's not mine, but one of my colleague who published without consulting me & i would ask him to drop that package and this is not an appropriate way.

@muzammilkm commented on GitHub (Jun 20, 2019): > BTW I see that you have added a NuGet `WireMock`, this is done because of above request ? No, that's not mine, but one of my colleague who published without consulting me & i would ask him to drop that package and this is not an appropriate way.
Author
Owner

@StefH commented on GitHub (Jun 20, 2019):

OK, if you can ask him to unlist the package, that would be great. Else users can be confused.

Did you have time to test latest WireMock.Net.1.0.21-ci-11468 ? Is it working for you?

@StefH commented on GitHub (Jun 20, 2019): OK, if you can ask him to unlist the package, that would be great. Else users can be confused. Did you have time to test latest WireMock.Net.1.0.21-ci-11468 ? Is it working for you?
Author
Owner

@muzammilkm commented on GitHub (Jun 20, 2019):

Thanks,
Verified in (1.0.21-ci-11471)

@muzammilkm commented on GitHub (Jun 20, 2019): Thanks, Verified in (1.0.21-ci-11471)
Author
Owner

@StefH commented on GitHub (Jun 20, 2019):

Ok. Thanks. Closing this one.

@StefH commented on GitHub (Jun 20, 2019): Ok. Thanks. Closing this one.
Author
Owner

@StefH commented on GitHub (Jul 3, 2019):

https://github.com/WireMock-Net/WireMock.Net/pull/286

@StefH commented on GitHub (Jul 3, 2019): https://github.com/WireMock-Net/WireMock.Net/pull/286
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net-wiremock#183