FIND YOUR NEXT FEW LINES

Results for “File operations & binary data”

Small, practical examples. Search by task or narrow things down below.

1473 snippets foundClear filters
GoFiles & paths

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
RustFiles & paths

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
PowerShellStructured formats & encodings

Write object records to a CSV file

PowerShell: Export-Csv uses property names as headers and quotes values when needed.

PowerShell✓ Tested
Bash ScriptsInput streams & redirection

Write several messages through one file descriptor

Bash Scripts: Open a destination once and close the descriptor after writing.

Bash Scripts✓ Tested
Linux CommandsGetting Started

Write text to a new practice file

Linux Commands: Write text to a new practice file using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
PowerShellFiles & paths

Write UTF-8 text to a file

Save a string without adding an extra newline.

Set-Content✓ Tested
RustFunctions & data types

Accept different types with a generic function

Accept different types with a generic function in a complete Rust program using the standard library.

Rust✓ Tested
PowerShellArray operations

Append an item to a small array

PowerShell: The plus-equals operator builds a new array; use a generic list for repeated large additions.

PowerShell✓ Tested
Docker / ComposeNetworks & volume metadata

Assign a network-scoped alias

Docker / Compose: An alias gives an endpoint an additional name on that network.

Docker / Compose✓ Tested
Docker / ComposeNetworks & volume metadata

Attach an existing container to another network

Docker / Compose: network connect adds an attachment without recreating the container.

Docker / Compose✓ Tested
PowerShellArray operations

Build a mutable generic list

PowerShell: A generic list supports repeated additions without copying an entire array each time.

PowerShell✓ Tested
RustFunctions & data types

Capture a surrounding value in a closure

Capture a surrounding value in a closure in a complete Rust program using the standard library.

Rust✓ Tested