Results for “Test-Path”
Small, practical examples. Search by task or narrow things down below.
Change an LED delay with a variable
Arduino / C: Assign a new value to a variable to change the next LED pulse duration.
Arduino / C✓ Tested
Check a change for whitespace problems
Git: Check a change for whitespace problems inside the disposable repository created by the input setup.
Git✓ Tested
Check a filename suffix
Java: Use endsWith for a case-sensitive literal suffix test.
Java✓ Tested
Check both ends of a range
Arduino / C: Check both ends of a range on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Check EEPROM capacity before a write
Arduino / C: length reports the available address count for this board.
Arduino / C✓ Tested
Check for an installed command
Bash Scripts: command -v checks command resolution without assuming a specific installation path.
Bash Scripts✓ Tested
Check JSONB containment
Test whether an object contains a key-value pair.
jsonb✓ Tested
Check native form validity before proceeding
jQuery: Use the native checkValidity API from the selected form.
jQuery✓ Tested
Check out another branch in a second working tree
Git: A linked worktree shares repository objects while maintaining a separate checked-out branch.
Git✓ Tested
Check what kind of Git object a revision names
Git: cat-file -t distinguishes a commit, tree, blob, or annotated tag.
Git✓ Tested
Check whether a file is already sorted
Linux Commands: Use sort -C for a quiet status check that does not rewrite the file.
Linux Commands✓ Tested
Check whether a function has been defined
Bash Scripts: declare -F tests a function name without executing it.
Bash Scripts✓ Tested