Results for “list files”
Small, practical examples. Search by task or narrow things down below.
Reject an escaping relative path
Reject an escaping relative path using a complete Go program with explicit sample inputs.
Go✓ Tested
Remove an empty directory only
Linux Commands: Use rmdir so a directory containing files cannot be removed accidentally.
Linux Commands✓ Tested
Rename a file with mv
Linux Commands: Rename a known file in the current directory and inspect its new contents.
Linux Commands✓ Tested
Render a helpful empty state
Render a helpful empty state with a small React component and explicit browser behavior.
React✓ Tested
Render a semantic data table
Render a semantic data table with a small React component and explicit browser behavior.
React✓ Tested
Render groups with nested loops
Render groups with nested loops with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Render nested groups with stable keys
Render nested groups with stable keys with a small React component and explicit browser behavior.
React✓ Tested
Run a command safely for each matching file
Linux Commands: Use find -exec with argument placeholders so spaces in filenames remain intact.
Linux Commands✓ Tested
Separate a filename extension
Separate a filename extension using a complete Go program with explicit sample inputs.
Go✓ Tested
Separate table headings data and totals
HTML: Thead, tbody, and tfoot group rows according to their purpose.
HTML✓ Tested
Set consistent widths for table columns
HTML: A colgroup applies presentation to whole columns without repeating styles on every cell.
HTML✓ Tested
Set owner-only file permissions
Linux Commands: Use chmod 600 to allow only the owner to read and write a file.
Linux Commands✓ Tested