lib/Fs/Ffn.ps1
function Ffn-Ext($ffn){$p=InstrRev $ffn "."; if($p -eq 0){""}else{Mid $ffn $p} } function Ffn-Fn ($ffn){$p=InstrRev $ffn (Pth-Sep); if($p -eq 0){$ffn}else{Mid $ffn ($p+1)} } function Ffn-Pth($ffn){$p=InstrRev $ffn (Pth-Sep); if($p -eq 0){""} else{Left $ffn $p} } function Rmv-Ext($fn) {Fst-OrAll $fn "." -rev } function Rpl-Ext($fn,$newExt){(Rmv-Ext $fn)+$newExt} function Add-FnSfx($fn,$sfx) {$a,$b=Brk-Dot2 $fn -rev;$a+$sfx+"."+$b} function Is-FilNewer($f1,$f2){(!(Test-Path $f2)) -or ((dir $f1).LastWriteTime -gt (dir $f2).LastWriteTime) } |