Skip to content

Commit 46ea662

Browse files
committed
Pass ExclusionFilters to ReplaceEmbeddedByPhysical for letting developers define which files should be included or excluded
Add an optional ExclusionFilters parameter (default: ExclusionFilters.Sensitive) to ReplaceEmbeddedByPhysical and forward it to the PhysicalFileProvider constructor when creating PhysicalVirtualFileSetInfo. This lets callers control which files are excluded when replacing embedded virtual file sets with physical directories.
1 parent fdc6d30 commit 46ea662

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/VirtualFileSetListExtensions.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ private static IFileProvider CreateFileProvider(
6464

6565
public static void ReplaceEmbeddedByPhysical<T>(
6666
[NotNull] this VirtualFileSetList fileSets,
67-
[NotNull] string physicalPath)
67+
[NotNull] string physicalPath,
68+
ExclusionFilters exclusionFilters = ExclusionFilters.Sensitive)
6869
{
6970
Check.NotNull(fileSets, nameof(fileSets));
7071
Check.NotNullOrWhiteSpace(physicalPath, nameof(physicalPath));
@@ -83,7 +84,7 @@ public static void ReplaceEmbeddedByPhysical<T>(
8384
thisPath = Path.Combine(thisPath, embeddedVirtualFileSet.BaseFolder!);
8485
}
8586

86-
fileSets[i] = new PhysicalVirtualFileSetInfo(new PhysicalFileProvider(thisPath), thisPath);
87+
fileSets[i] = new PhysicalVirtualFileSetInfo(new PhysicalFileProvider(thisPath, exclusionFilters), thisPath);
8788
}
8889
}
8990
}

0 commit comments

Comments
 (0)