## Uniquify-Path ## function Uniquify-Path {param([Parameter(Mandatory=$true)]$path) $extension = [io.path]::getextension($path) $prefix = $path.substring(0, $path.length - $extension.length) #uniquify path has a bug when run on root of a drive. # potentially add a serial if already exists due to testing or multiple logarchive runs for ($i = 1; (test-path $path) -or (test-path "$path.gz"); ++$i) { $path = "$prefix-$i$extension" } $path }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 8410 | Aaron Bockelie |
Root checkin, Perforce Powershell wrapper. Still lots of work to be done, namely documentation and deployment tools, for instance, get-help needs work on the majority of these tools. Additionally, the /lib structure needs a little bit of condensation, probably into major groups (depot, userspec, clientspec, group management, and so on) that way function family can exist under each resource. |