Results for “Test-Path”
Small, practical examples. Search by task or narrow things down below.
Create nested directories
Create nested directories using a complete Go program with explicit sample inputs.
Go✓ Tested
Delete a known scratch file
C#: File.Delete ignores a missing file but still throws for other I/O failures.
C#✓ Tested
Distinguish end-of-input from other errors
Distinguish end-of-input from other errors using a complete Go program with explicit sample inputs.
Go✓ Tested
Enumerate matching files recursively
C#: Sort relative filenames when reproducible traversal output is required.
C#✓ Tested
Exercise a function with a table of inputs
Exercise a function with a table of inputs in a complete Rust program using the standard library.
Rust✓ Tested
Extract a JSON field
Read a scalar value from JSON text.
json_extract✓ Tested
Extract filename components
Python: Use pathlib properties to separate a directory, filename stem, and suffix.
Python✓ Tested
Inspect a file length without reading it
C#: Use FileInfo.Length to retrieve a logical size in bytes.
C#✓ Tested
Limit the bytes read from a stream
Limit the bytes read from a stream using a complete Go program with explicit sample inputs.
Go✓ Tested
Move a collection out and leave an empty default
Move a collection out and leave an empty default in a complete Rust program using the standard library.
Rust✓ Tested
Move a file to a new filename
C#: File.Move changes the file path without loading its contents.
C#✓ Tested
Own a heap-allocated value with Box
Own a heap-allocated value with Box in a complete Rust program using the standard library.
Rust✓ Tested