Skip to content

Commit 5e1c92b

Browse files
alievertzAndy Lievertz
andauthored
Initial release including Get-OZODirectorySummary; v1.0.0
* save commit * Initial release including Get-OZODirectorySummary; v1.0.0 --------- Co-authored-by: Andy Lievertz <alievertz@onezeroone.dev>
1 parent 6e36aef commit 5e1c92b

10 files changed

Lines changed: 484 additions & 2 deletions

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# OZOFiles PowerShell Module Change Log
2+
3+
|Date|Version|Comment|
4+
|----|-------|-------|
5+
|2025-May-19|1.0.0|Initial release including `Get-OZODirectorySummary`.|
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Get-OZOChildWriteTime
2+
This function is part of the [OZOFiles PowerShell Module](../README.md).
3+
4+
## Description
5+
Returns the newest or oldest write time for all files within a given path. Returns the newest write time when executed with no parameters.
6+
7+
## Syntax
8+
```
9+
Get-OZOChildWriteTime
10+
-Oldest
11+
-Path <String>
12+
```
13+
## Parameters
14+
|Parameter|Description|
15+
|---------|-----------|
16+
|`Oldest`|Return the oldest date time.|
17+
|`Path`|The path to inspect. Defaults to the current directory. If Path is invalid or inaccessible, the script returns a datetime object representing 1970-01-01 00:00:00.|
18+
19+
## Examples
20+
21+
### Example 1
22+
```powershell
23+
Get-OZOChildWriteTime -Path (Join-Path -Path $Env:USERPROFILE -ChildPath "Git")
24+
Saturday, February 15, 2025 17:44:45
25+
```
26+
27+
### Example 2
28+
```powershell
29+
Get-OZOChildWriteTime -Path (Join-Path -Path $Env:USERPROFILE -ChildPath "Git") -Oldest
30+
Friday, February 9, 2024 18:03:56
31+
```
32+
33+
## Outputs
34+
`System.DateTime`
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Get-OZODirectorySummary
2+
This function is part of the [OZOFiles PowerShell Module](../README.md).
3+
4+
## Description
5+
Returns an OZODirectorySummary object.
6+
7+
## Syntax
8+
```
9+
Get-OZODirectorySummary
10+
-Path <String>
11+
```
12+
## Parameters
13+
|Parameter|Description|
14+
|---------|-----------|
15+
|`Path`|The path to inspect.|
16+
17+
## Examples
18+
```powershell
19+
Get-OZODirectorySummary -Path (Join-Path -Path $Env:USERPROFILE -ChildPath "Downloads")
20+
21+
Validates : True
22+
newestChildWriteTime : 5/19/2025 13:43:51
23+
longLength : 256
24+
totalSizeBytes : 4280832613
25+
Path : C:\Users\aliev\Downloads
26+
longPaths : {}
27+
problemPaths : {}
28+
objectSIDs : {S-1-5-18, S-1-5-32-544, S-1-5-21-1004336348-1177238915-682003330-1191}
29+
```
30+
31+
## Outputs
32+
`PSCustomOBject`
33+
34+
## Notes
35+
For more information, please see the [`OZODirectorySummary` class definition](OZODirectorySummary.md)
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Get-OZOFileToBase64
2+
This function is part of the [OZOFiles PowerShell Module](../README.md).
3+
4+
## Description
5+
Returns a Base-64 string representing a valid file, or "File not found" if the file does not exist or cannot be read.
6+
7+
## Syntax
8+
```
9+
Get-OZOFileToBase64
10+
-Path <String>
11+
```
12+
13+
## Parameters
14+
|Parameter|Description|
15+
|---------|-----------|
16+
|`Path`|The path to the file to convert to a base-64 string.|
17+
18+
## Examples
19+
```powershell
20+
Get-OZOFileToBase64 -Path ".\README.md"
21+
IyBPWk8gUG93ZXJTaGVsbCBNb2R1bGUgSW5zdGFsbGF... <snip>
22+
```
23+
24+
## Outputs
25+
`System.String`
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# OZODirectorySummary Class
2+
This class is part of the [OZOFiles PowerShell Module](../README.md). Calling the `Get-OZODirectorySummary` function returns an object of the `OZODirectorySummary` class.
3+
4+
```
5+
+ $Validates:Boolean = $true
6+
+ $newestChildWriteTime:DateTime = (Get-Date -Year 1970 -Month 01 -Day 01 -Hour 00 -Minute 00 -Second 00)
7+
+ $longLength:Int32 = 0
8+
+ $totalSizeBytes:Int64 = 0
9+
+ $Path:String = $null
10+
+ $objectSIDs:System.Collections.Generic.List[String] = @()
11+
+ $longPaths:System.Collections.Generic.List[System.IO.FileSystemInfo] = @()
12+
+ $problemPaths:System.Collections.Generic.List[System.IO.FileSystemInfo] = @()
13+
```
14+
---
15+
```
16+
+ OZODirectorySummary($LongLength,$Path):void
17+
- ValidateEnvironment():Boolean
18+
- GetDirectorySummary():Boolean
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Set-OZOBase64ToFile
2+
This function is part of the [OZOFiles PowerShell Module](../README.md).
3+
4+
## Description
5+
Writes a base-64 string to disk as a file. Returns TRUE on success and FALSE on failure.
6+
7+
## Syntax
8+
```
9+
Set-OZOBase64ToFile
10+
-Base64 <String>
11+
-Path <String>
12+
```
13+
14+
## Parameters
15+
|Parameter|Description|
16+
|---------|-----------|
17+
|`Base64`|The base-64 string to convert.|
18+
|`Path`|The output file path. If the file exists, it will be overwritten.|
19+
20+
## Examples
21+
```powershell
22+
Set-OZOBase64ToFile -Base64 "IyBPWk8gUG93ZXJTaGVsbCBNb2R1bGUgSW5zdGFsbGF..." -Path ".\README.md"
23+
True
24+
```

Documentation/Test-OZOPath.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Test-OZOPath
2+
This function is part of the [OZOFiles PowerShell Module](../README.md).
3+
4+
## Description
5+
Determines if a path exists and is readable. Optionally tests if the path is writable.
6+
7+
## Syntax
8+
```
9+
Test-OZOPath
10+
-Path <String>
11+
```
12+
13+
## Parameters
14+
|Parameter|Description|
15+
|---------|-----------|
16+
|`Path`|The path to test. Returns TRUE if the path exists and is readable and otherwise returns FALSE.|
17+
|`Writable`|Determines if the path is writable. Returns TRUE if the path is writable and otherwise returns FALSE.|
18+
19+
## Examples
20+
```powershell
21+
Test-OZOPath -Path ".\README.md"
22+
True
23+
```
24+
25+
## Outputs
26+
`System.Boolean`

OZOFiles/OZOFiles.psd1

2.36 KB
Binary file not shown.

0 commit comments

Comments
 (0)