You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This allows the client to provide a callback to be invoked just before (OnBeforeTraverse) a directory has been traversed and then afterwards (OnAfterTraverse ). But we only invoke these, is the directory being traverse contains sub-directories; ie it is not a leaf directory (any place that invokes Get-ChildItem, should be wrapped with OnBefore/OnAfer).
eg, currently:
# Now perform start of recursive traversal#
[System.IO.DirectoryInfo[]]$directoryInfos=Get-ChildItem-Path $Path`-Directory |Where-Object { $Condition.InvokeReturnAsIs($_) }
if ($directoryInfos) {
$directoryInfos|Invoke-ForeachFsItem-Directory -Block $adapter`-Exchange $Exchange-Condition $Condition-Summary $Summary;
}
would become:
# Now perform start of recursive traversal#
[System.IO.DirectoryInfo[]]$directoryInfos=Get-ChildItem-Path $Path`-Directory |Where-Object { $Condition.InvokeReturnAsIs($_) }
if ($directoryInfos.Count-gt0) {
# Invoke-OnBeforeTraverse
}
if ($directoryInfos) {
$directoryInfos|Invoke-ForeachFsItem-Directory -Block $adapter`-Exchange $Exchange-Condition $Condition-Summary $Summary;
}
if ($directoryInfos.Count-gt0) {
# Invoke-OnAfterTraverse
}
The text was updated successfully, but these errors were encountered:
This would allow a client to perform once per traversal level functionality, eg check the existence of a custom options file, or whatever else is required.
This allows the client to provide a callback to be invoked just before (
OnBeforeTraverse
) a directory has been traversed and then afterwards (OnAfterTraverse
). But we only invoke these, is the directory being traverse contains sub-directories; ie it is not a leaf directory (any place that invokes Get-ChildItem, should be wrapped with OnBefore/OnAfer).eg, currently:
would become:
The text was updated successfully, but these errors were encountered: