Results for “missing”
Small, practical examples. Search by task or narrow things down below.
Create a directory tree
Create a directory and its missing parent directories. The -p option also succeeds when the directories already exist.
directory✓ Tested
Create nested directories
Create missing parent directories with Java Files.createDirectories.
Java✓ Tested
Create nested folders
Create a folder and any missing parent folders in one call. Running the code again is safe when the folder already exists.
directory✓ Tested
Delete a known scratch file
C#: File.Delete ignores a missing file but still throws for other I/O failures.
C#✓ Tested
Delete one matching row
Remove a selected record and inspect what remains.
DELETE✓ Tested
Distinguish unset variables from empty strings
Bash Scripts: Omitting the colon tests only whether a variable is unset; including it also treats an empty value as missing.
Bash Scripts✓ Tested
Give a function an optional argument
Let callers omit a value while keeping nounset enabled.
optional argument✓ Tested
Give an optional property a default
Handle missing object fields with nullish coalescing.
optional✓ Tested
Group records into map entries
JavaScript: Initialize an array for a missing Map key before appending its values.
JavaScript✓ Tested
Group records into map entries
TypeScript: Initialize an array for a missing Map key before appending its values.
TypeScript✓ Tested
Look up a map key
Use find to read a C++ map without inserting a missing key.
C++✓ Tested
Pair corresponding array items by position
JavaScript: Validate equal lengths before zipping when missing counterparts would be an error.
JavaScript✓ Tested