2
0
mirror of https://github.com/9ParsonsB/Pulsar.git synced 2025-12-15 20:34:58 +01:00

Add Shipyard & Fix ShipLocker

Update File handling
Update Journal handling
Update README.md
This commit is contained in:
2024-05-10 22:26:44 +10:00
parent bc958e7679
commit 235cb2401a
17 changed files with 255 additions and 530 deletions

View File

@@ -26,7 +26,10 @@ public class FileWatcherService(IOptions<PulsarConfiguration> options, IFileHand
{
foreach (var file in watcher.GetDirectoryContents(""))
{
if (!file.Name.EndsWith(".json") || file.IsDirectory) continue;
if (file.IsDirectory || !file.Name.EndsWith(".json") && !(file.Name.StartsWith(FileHandlerService.JournalLogFileNameStart) && file.Name.EndsWith(FileHandlerService.JournalLogFileNameEnd)))
{
continue;
}
var existing = FileDates.GetOrAdd(file.PhysicalPath, file.LastModified);
@@ -40,7 +43,7 @@ public class FileWatcherService(IOptions<PulsarConfiguration> options, IFileHand
private void Watch()
{
watcher.Watch("**/*.json").RegisterChangeCallback(HandleFileChanged, null);
watcher.Watch("*.*").RegisterChangeCallback(HandleFileChanged, null);
}
public Task StopAsync(CancellationToken cancellationToken)