Results for “Files & paths”
Small, practical examples. Search by task or narrow things down below.
Join portable path components
Join portable path components using a complete Go program with explicit sample inputs.
Go✓ Tested
Read buffered lines from a file
Read buffered lines from a file in a complete Rust program using the standard library.
Rust✓ Tested
Read file metadata without reading its contents
Read file metadata without reading its contents in a complete Rust program using the standard library.
Rust✓ Tested
Read text line by line
Read text line by line using a complete Go program with explicit sample inputs.
Go✓ Tested
Reject an escaping relative path
Reject an escaping relative path using a complete Go program with explicit sample inputs.
Go✓ Tested
Separate a filename extension
Separate a filename extension using a complete Go program with explicit sample inputs.
Go✓ Tested
Write and read a UTF-8 file
Write and read a UTF-8 file using a complete Go program with explicit sample inputs.
Go✓ Tested
Write and read a UTF-8 file
Write and read a UTF-8 file in a complete Rust program using the standard library.
Rust✓ Tested
Exclude generated files from an archive
Linux Commands: Place exclude options before the input paths to control archive membership.
Linux Commands✓ Tested
Find files by extension
Search a directory tree for regular files with a particular extension and print their paths.
find✓ Tested
Find matching files recursively
Python: Use rglob and sorted relative paths for a reproducible recursive file listing.
Python✓ Tested
Find matching files recursively
PowerShell: Select files explicitly and sort their names for predictable presentation.
PowerShell✓ Tested