Results for “portable paths”
Small, practical examples. Search by task or narrow things down below.
List distinct values
Remove duplicate category values from a result.
DISTINCT✓ Tested
List files changed by the current commit
Git: diff-tree exposes the paths changed between a commit and its parent.
Git✓ Tested
List files in a folder
List the names of regular files in a folder in alphabetical order, excluding subdirectories.
directory✓ Tested
List matching files
Enumerate immediate text files and sort their names in C#.
C#✓ Tested
List regular files
List immediate regular files in sorted order and close the Java directory stream.
Java✓ Tested
List regular files recursively in sorted order
C++: Collect relative paths before sorting because directory iteration order is unspecified.
C++✓ Tested
List unordered pairs without duplicate reversals
SQL: Join using an increasing key comparison to omit self-pairs and reversed duplicates.
SQL✓ Tested
Make a pair of columns unique together
SQL: A composite primary key permits repeated individual values while forbidding a duplicate combination.
SQL✓ Tested
Match a known text prefix
SQL: A percent wildcard matches zero or more characters following the prefix.
SQL✓ Tested
Match a text prefix
SQL: Use a percent wildcard after a known prefix.
SQL✓ Tested
Match one of several values
Use IN to avoid repeating equality conditions.
IN✓ Tested
Match one value from a short list
SQL: Use IN for a set of allowed values.
SQL✓ Tested