Skip to content

Releases: santisq/PSTree

v2.2.0

12 Sep 18:59
Compare
Choose a tag to compare

What's Changed

GetPSTree     TreeStyle

Full Changelog: v2.1.18...v2.2.0

v2.1.18

03 Sep 20:48
8d4e534
Compare
Choose a tag to compare

What's Changed

  • Makes Depth property public for PSTreeFileSystemInfo instances.
  • Makes GetParents() method private, absolutely no reason to have it public.
  • Added properties ItemCount and TotalItemCount to PSTreeDirectory instances, requested in #34.
PS ..\PSTree> pstree -Recurse -Force -Directory | Select-Object Hierarchy, Depth, ItemCount, TotalItemCount -First 15

Hierarchy                  Depth ItemCount TotalItemCount
---------                  ----- --------- --------------
PSTree                         0        15           1476
├── .git                       1        13           1078
│   ├── hooks                  2        13             13
│   ├── info                   2         1              1
│   ├── logs                   2         2             24
│   │   └── refs               3         2             22
│   │       ├── heads          4         9              9
│   │       └── remotes        4         1             11
│   │           └── origin     5        10             10
│   ├── objects                2       244            995
│   │   ├── 00                 3         3              3
│   │   ├── 01                 3         2              2
│   │   ├── 02                 3         3              3
│   │   ├── 03                 3         4              4
│   │   ├── 04                 3         2              2

PS ..\PSTree> (Get-ChildItem -Force).Count
15
PS ..\PSTree> (Get-ChildItem -Force -Recurse).Count
1476
PS ..\PSTree> (Get-ChildItem .git -Force).Count 
13
PS ..\PSTree> (Get-ChildItem .git -Force -Recurse).Count
1078
PS ..\PSTree>

Full Changelog: v2.1.17...v2.1.18

v2.1.17

30 Aug 00:35
b11df98
Compare
Choose a tag to compare

What's Changed

  • Updates build process by @santisq in #31
  • Updates CI pipeline by @santisq in #32
  • Fixes #9 by @santisq in #33. Output is now sorted by ascending values:
    • PSTree v2.1.16

      PS ..\PSTree> pstree -Directory -Depth 2
      
        Source: D:\...\PSTree
      
      Mode            Length Hierarchy
      ----            ------ ---------
      d----         25.27 KB PSTree
      d----          3.72 KB ├── tools
      d----         16.96 KB │   ├── ProjectBuilder
      d----          0.00  B │   └── Modules
      d----         13.66 KB ├── tests
      d----          0.00  B ├── src
      d----         13.26 KB │   └── PSTree
      d----        168.69 KB ├── output
      d----         92.50 KB │   ├── TestResults
      d----          0.00  B │   └── PSTree
      d----          6.26 KB ├── module
      d----          0.00  B ├── docs
      d----          7.37 KB │   └── en-US
      d----          4.11 KB ├── .vscode
      d----          0.00  B └── .github
      d----          4.10 KB     └── workflows
    • PSTree v2.1.17

      PS ..\PSTree> pstree -Directory -Depth 2
      
        Source: D:\Zen\Documents\Scripts\PSTree
      
      Mode            Length Hierarchy
      ----            ------ ---------
      d----         25.27 KB PSTree
      d----          0.00  B ├── .github
      d----          4.10 KB │   └── workflows
      d----          4.11 KB ├── .vscode
      d----          0.00  B ├── docs
      d----          7.37 KB │   └── en-US
      d----          6.26 KB ├── module
      d----        168.69 KB ├── output
      d----          0.00  B │   ├── PSTree
      d----         92.50 KB │   └── TestResults
      d----          0.00  B ├── src
      d----         13.26 KB │   └── PSTree
      d----         13.66 KB ├── tests
      d----          3.72 KB └── tools
      d----          0.00  B     ├── Modules
      d----         16.96 KB     └── ProjectBuilder

Full Changelog: v2.1.16...v2.1.17

v2.1.16

26 Feb 17:59
Compare
Choose a tag to compare

What's Changed

  • Added method .GetFormattedLength(). Outputs the friendly .Length representation of PSTreeFile and PSTreeDirectory instances.

    PS ..\PSTree> (Get-PSTree D:\ -RecursiveSize -Depth 0).GetFormattedLength()
    629.59 GB

Full Changelog: v2.1.15...v2.1.16

v2.1.15

06 Oct 03:19
31e17cd
Compare
Choose a tag to compare

What's Changed

  • Add -Include Parameter by @santisq in #26. Works very similar to -Exclude, the patterns are evaluated against the items .FullName property, however this parameter targets only files (FileInfo instances).

Full Changelog: v2.1.14...v2.1.15

v2.1.14

12 Sep 00:59
Compare
Choose a tag to compare

What's Changed

  • No changes to the cmdlet but a few improvements to the code base:
    • #16 PSTreeCache and PSTreeIndexer internal classes have been sealed following the recommendations from dotnet/runtime#49944.
    • #17 Indent extension method has been changed to use StringBuilder.
    • #19 Improved ConvertToTree method. Was too complicated and inefficient, there was also no need to use Regex.
    • #20 -Depth parameter type was changed from int to uint and the documentation was updated accordingly.

Full Changelog: v2.1.13...v2.1.14

v2.1.13

28 Jul 23:49
Compare
Choose a tag to compare

What's Changed

  • Added .ToString() method to PSTreeFileSystemInfo<T> instances, the method resolves to the instances .FullName property similar to FileSystemInfo.ToString Method. Now it should be possible to pipe Get-PSTree output to Get-Item and Get-ChildItem when needed:

    Get-PStree -Depth 0 | Get-Item
  • Added .Refresh() method to PSTreeFileSystemInfo<T>, functionality is the same as FileSystemInfo.Refresh Method.

  • Reorganizing source files and Pester tests.

  • Added more Pester tests.

  • Fixed a few documentation typos.

Full Changelog: v2.1.12...v2.1.13

v2.1.12

04 Jul 00:24
496cbcc
Compare
Choose a tag to compare

What's Changed

  • Added -Path parameter, now both -Path and -LiteralPath parameters take string[] as input and support pipeline input.

  • Added Pester tests, Code Coverage and coverage upload to codecov.io.

  • Removed .Size Property from PSTreeFile and PSTreeDirectory instances. The Size column has been renamed to Length and moved to the left-hand side of the Hierarchy column (I know it looks much better on the right-hand side 😑 but having it in the left allows for fixed width in the first 2 columns, which in turn brings less formatting issues 🤷‍♂️...).

    The default display for this column is available through [PSTree.Internal._Format]::GetFormattedLength(...), for example:

    Get-PSTree | Select-Object Hierarchy, @{ N='Size'; E={ [PSTree.Internal._Format]::GetFormattedLength($_.Length) }}
  • Added GroupBy tag to the default view, now trees are grouped by the source Path omg! Little example:

    PS ..\PSTree> Get-PSTree .\src\, .\module\ -Exclude *\obj, *\bin
    
      Source: C:\path\to\PSTree\src
    
    Mode            Length Hierarchy
    ----            ------ ---------
    d----          0.00  B src
    d----         10.30 KB └── PSTree
    -a---        931.00  B     ├── ExceptionHelpers.cs
    -a---        439.00  B     ├── PSTree.csproj
    -a---          1.06 KB     ├── PSTreeDirectory.cs
    -a---          4.01 KB     ├── PSTreeExtensions.cs
    -a---        517.00  B     ├── PSTreeFile.cs
    -a---        399.00  B     ├── PSTreeFileSystemInfo.cs
    -a---          1.51 KB     ├── PSTreeFileSystemInfo_T.cs
    -a---        897.00  B     ├── PSTreeHelper.cs
    -a---        619.00  B     ├── PSTreeIndexer.cs
    d----          1.13 KB     ├── Internal
    -a---          1.13 KB     │   └── _Format.cs
    d----          5.68 KB     └── Commands
    -a---          5.68 KB         └── GetPSTreeCommand.cs
    
      Source: C:\path\to\PSTree\module
    
    Mode            Length Hierarchy
    ----            ------ ---------
    d----          6.22 KB module
    -a---          1.54 KB ├── PSTree.Format.ps1xml
    -a---          4.67 KB └── PSTree.psd1

Full Changelog: v2.1.11...v2.1.12

v2.1.11

23 Mar 13:46
Compare
Choose a tag to compare

What's Changed

  • Fixed documentation typos and grammar mistakes.
  • Fixed a bug that would make piping FileInfo instances to the cmdlet not register their size.

Full Changelog: v2.1.10...v2.1.11

v2.1.10

23 Mar 01:18
Compare
Choose a tag to compare

What's Changed

  • Fixed a bug that would make piping FileInfo objects fail.

Full Changelog: v2.1.9...v2.1.10