Skip to content

Commit

Permalink
updating docs. typos...
Browse files Browse the repository at this point in the history
  • Loading branch information
santisq committed Oct 26, 2022
1 parent 83ad440 commit 9c40b75
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 23 deletions.
File renamed without changes.
6 changes: 3 additions & 3 deletions PSTree/PSTree.psd1 → PSTree.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
RootModule = 'PSTree.psm1'

# Version number of this module.
ModuleVersion = '2.1.6'
ModuleVersion = '2.1.7'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -96,10 +96,10 @@
Tags = @('hierarchy', 'tree')

# A URL to the license for this module.
# LicenseUri = 'https://www.github.com/santysq/PSTree/blob/main/LICENSE'
LicenseUri = 'https://www.github.com/santisq/PSTree/blob/main/LICENSE'

# A URL to the main website for this project.
ProjectUri = 'https://www.github.com/santysq/PSTree'
ProjectUri = 'https://www.github.com/santisq/PSTree'

# A URL to an icon representing this module.
# IconUri = ''
Expand Down
2 changes: 2 additions & 0 deletions PSTree.psm1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
'classes', 'public' | ForEach-Object { Join-Path $PSScriptRoot -ChildPath $_ } |
Get-ChildItem -Filter *.ps1 -Recurse | ForEach-Object { . $_.FullName }
1 change: 0 additions & 1 deletion PSTree/PSTree.psm1

This file was deleted.

132 changes: 116 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
PowerShell function that intends to emulate the [`tree` command](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/tree) with added functionality to calculate the __folders size__ as well as __recursive folders size__.

---
## Changelog
## CHANGELOG

- __10/23/2022__
- __PSTree Module__ is now published to the [PowerShell Gallery](https://www.powershellgallery.com/)!
Expand Down Expand Up @@ -80,31 +80,131 @@ d---- └── Format 1.83 Kb

---

## INSTALLATION

## Parameters
```powershell
Install-Module PSTree -Scope CurrentUser
```

| Parameter Name | Description
| --- | --- |
| `-Path <string>` | Absolute or relative Folder Path |
| `[-Depth <int>]` | Controls the recursion limit |
| `[-Recurse <switch>]` | Traverse all Directory hierarchy |
| `[-Force <switch>]` | Displays hidden Files and Folders |
| `[-Directory <switch>]` | Displays Folders only |
| `[-RecursiveSize]` | Displays the recursive Folders Size |
| `[<CommonParameters>]` | See [`about_CommonParameters`](https://go.microsoft.com/fwlink/?LinkID=113216) |
## SYNTAX

## Installation
### Depth (Default)

```powershell
Install-Module PSTree -Scope CurrentUser
Get-PSTree [[-Path] <String>] [[-Depth] <Int32>] [-Force] [-Directory] [-RecursiveSize] [<CommonParameters>]
```

### Recurse

```powershell
Get-PSTree [[-Path] <String>] [-Recurse] [-Force] [-Directory] [-RecursiveSize] [<CommonParameters>]
```

## PARAMETERS

### -Path
Absolute or relative folder path.

```yaml
Type: String
Parameter Sets: (All)
Aliases: FullName

Required: False
Position: 1
Default value: $PWD
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

### -Depth
Controls the recursion limit

```yaml
Type: Int32
Parameter Sets: Depth
Aliases:

Required: False
Position: 2
Default value: 3
Accept pipeline input: False
Accept wildcard characters: False
```

### -Recurse

Traverse all Directory hierarchy

```yaml
Type: SwitchParameter
Parameter Sets: Recurse
Aliases:

Required: False
Position: 2
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

### -Force

Displays hidden Files and Folders

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

## Compatibility
### -Directory

Displays Folders only

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

### -RecursiveSize

Displays the recursive Folders Size

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).


- Tested and compatible with __PowerShell v5.1__ and __PowerShell Core 7+__.
## REQUIREMENTS

## Usage
Compatible with __PowerShell v5.1__ and __PowerShell Core 7+__.

## USAGE

### Get hierarchy of the current Directory with default parameters (`-Depth 3`)

Expand Down
File renamed without changes.
10 changes: 7 additions & 3 deletions PSTree/public/Get-PSTree.ps1 → public/Get-PSTree.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,26 @@ Object[], PSTreeDirectory, PSTreeFile
.EXAMPLE
Get-PSTree
Get hierarchy of the current Directory with default parameters (`-Depth 3`)
.EXAMPLE
Get-PSTree -Directory -Recurse
Get hierarchy of the current Directory recursively displaying only Folders
.EXAMPLE
Get-PSTree -Depth 2 -Force
Get hierarchy of the current Directory 2 levels deep and displaying hidden Folders
.EXAMPLE
Get hierarchy 2 levels deep displaying only Folders with their recursive size
Get-PSTree -Depth 2 -RecursiveSize -Directory
Get hierarchy 2 levels deep displaying only Folders with their recursive size
.LINK
https://github.com/santysq/PSTree
https://github.com/santisq/PSTree
#>

function Get-PSTree {
Expand All @@ -72,7 +76,7 @@ function Get-PSTree {
[parameter(ParameterSetName = 'Depth', Position = 1)]
[int] $Depth = 3,

[parameter(ParameterSetName = 'Max', Position = 1)]
[parameter(ParameterSetName = 'Recurse', Position = 1)]
[switch] $Recurse,

[parameter()]
Expand Down

0 comments on commit 9c40b75

Please sign in to comment.