Skip to content

Commit

Permalink
Add settings declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
jvlflame committed Aug 31, 2020
1 parent 0a4af85 commit e20b0f7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Javinizer/Public/Get-JVItem.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function Get-JVItem {
[Switch]$Recurse,
[Parameter()]
[Switch]$Strict,
[Parameter(ValueFromPipeline = $true)]
[Parameter()]
[PSObject]$Settings,
[Parameter(ValueFromPipelineByPropertyName = $true)]
[Alias('match.minimumfilesize')]
Expand All @@ -34,6 +34,16 @@ function Get-JVItem {

process {
$fileObject = @()
if ($Settings) {
$MinimumFileSize = $Settings.'match.mninimumfilesize'
$ExcludedStrings = $Settings.'match.excludedfilestring'
$IncludedExtensions = $Settings.'includedfileextension'
$RegexEnabled = $Settings.'match.regex'
$RegexString = $Settings.'match.regex.string'
$RegexIdMatch = $Settings.'match.regex.idmatch'
$RegexPtMatch = $Settings.'match.regex.ptmatch'
}

if ($ExcludedStrings) {
$files = Get-ChildItem -LiteralPath $Path -Recurse:$Recurse -Exclude:$ExcludedStrings | Where-Object {
$_.Extension -in $IncludedExtensions `
Expand Down

0 comments on commit e20b0f7

Please sign in to comment.