Results for “File operations & binary data”
Small, practical examples. Search by task or narrow things down below.
Handle a filename pattern with no matches
Use nullglob so an unmatched pattern produces an empty array.
nullglob✓ Tested
Handle a filename that begins with a dash
Linux Commands: Use -- to terminate command options before an unusual filename.
Linux Commands✓ Tested
Handle a missing file without treating it as an empty file
C: Inspect errno after a failed fopen to distinguish the documented missing-path condition.
C✓ Tested
Ignore a disposable generated file
Git: Ignore a disposable generated file inside the disposable repository created by the input setup.
Git✓ Tested
Ignore a personal scratch file without changing shared rules
Git: The repository-local exclude file applies only to this checkout.
Git✓ Tested
Ignore generated files
Exclude build output from untracked-file listings.
gitignore✓ Tested
Include a nonvisible value in form data
HTML: A named hidden input contributes data without adding a visible editing control.
HTML✓ Tested
Include untracked files in a stash
Git: The include-untracked option saves new files along with tracked edits.
Git✓ Tested
Initialize component data with ngOnInit
Initialize component data with ngOnInit with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Inject a data loader into a component
Inject a data loader into a component with a small React component and explicit browser behavior.
React✓ Tested
Inspect a path’s filename and extension
Inspect a path’s filename and extension in a complete Rust program using the standard library.
Rust✓ Tested
Inspect structured data with JsonPipe
Inspect structured data with JsonPipe with a standalone Angular component and explicit browser behavior.
Angular✓ Tested