Results for “File operations & archives”
Small, practical examples. Search by task or narrow things down below.
Test whether one revision is an ancestor of another
Git: merge-base --is-ancestor reports its answer through the exit status.
Git✓ Tested
Toggle a state class
Toggle a CSS class in a jQuery click handler.
jQuery✓ Tested
Transform a value by shadowing
Transform a value by shadowing in a complete Rust program using the standard library.
Rust✓ Tested
Transform an optional value
Transform an optional value in a complete Rust program using the standard library.
Rust✓ Tested
Transform each item in a collection
Build a result array with a foreach expression.
foreach✓ Tested
Transform each pipeline value
PowerShell: Transform each pipeline value using PowerShell 7.
PowerShell✓ Tested
Transform each value with map
Transform each value with map in a complete Rust program using the standard library.
Rust✓ Tested
Transpose an optional parsing result
Transpose an optional parsing result in a complete Rust program using the standard library.
Rust✓ Tested
Trim surrounding whitespace
Trim surrounding whitespace using a complete Go program with explicit sample inputs.
Go✓ Tested
Trim whitespace around a string
PowerShell: The Trim method removes surrounding whitespace while preserving the middle of the string.
PowerShell✓ Tested
Trim whitespace around text
Trim whitespace around text in a complete Rust program using the standard library.
Rust✓ Tested
Try a channel receive without blocking
Try a channel receive without blocking using a complete Go program with explicit sample inputs.
Go✓ Tested