Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Zio/FileSystems/AggregateFileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,13 @@ protected override UPath ConvertPathFromDelegate(UPath path)
// Watch API
// ----------------------------------------------

/// <inheritdoc />
protected override bool CanWatchImpl(UPath path)
{
// Always allow watching because a future filesystem can be added that matches this path.
return true;
}

/// <inheritdoc />
protected override IFileSystemWatcher WatchImpl(UPath path)
{
Expand Down
6 changes: 6 additions & 0 deletions src/Zio/FileSystems/ComposeFileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,12 @@ protected override IEnumerable<UPath> EnumeratePathsImpl(UPath path, string sear
// ----------------------------------------------
// Watch API
// ----------------------------------------------

/// <inheritdoc />
protected override bool CanWatchImpl(UPath path)
{
return NextFileSystemSafe.CanWatch(ConvertPathToDelegate(path));
}

/// <inheritdoc />
protected override IFileSystemWatcher WatchImpl(UPath path)
Expand Down
7 changes: 7 additions & 0 deletions src/Zio/FileSystems/MountFileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,13 @@ IEnumerable<UPath> EnumeratePathFromFileSystem(UPath subPath, bool failOnInvalid
}
}

/// <inheritdoc />
protected override bool CanWatchImpl(UPath path)
{
// Always allow watching because a future filesystem can be added that matches this path.
return true;
}

/// <inheritdoc />
protected override IFileSystemWatcher WatchImpl(UPath path)
{
Expand Down
11 changes: 11 additions & 0 deletions src/Zio/FileSystems/PhysicalFileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,17 @@ protected override IEnumerable<UPath> EnumeratePathsImpl(UPath path, string sear
// ----------------------------------------------
// Watch API
// ----------------------------------------------

/// <inheritdoc />
protected override bool CanWatchImpl(UPath path)
{
if (IsWithinSpecialDirectory(path))
{
return SpecialDirectoryExists(path);
}

return Directory.Exists(ConvertPathToInternal(path));
}

/// <inheritdoc />
protected override IFileSystemWatcher WatchImpl(UPath path)
Expand Down