add folder to solution model on create

This commit is contained in:
Matt Parker
2025-10-19 22:56:14 +10:00
parent 45df81afe6
commit 8a02d6a519
3 changed files with 31 additions and 3 deletions

View File

@@ -73,9 +73,16 @@ public sealed class IdeFileWatcher : IDisposable
private void HandleCreated(string fullPath)
{
if (Path.HasExtension(fullPath) is false) return; // we don't care about directory changes
var isDirectory = Path.HasExtension(fullPath) is false;
if (isDirectory)
{
GlobalEvents.Instance.FileSystemWatcherInternal.DirectoryCreated.InvokeParallelFireAndForget(fullPath);
}
else
{
GlobalEvents.Instance.FileSystemWatcherInternal.FileCreated.InvokeParallelFireAndForget(fullPath);
}
//Console.WriteLine($"FileSystemWatcher: Created - {fullPath}");
GlobalEvents.Instance.FileSystemWatcherInternal.FileCreated.InvokeParallelFireAndForget(fullPath);
}
// The only changed event we care about is files, not directories