FIND YOUR NEXT FEW LINES

Results for “File operations & archives”

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

947 snippets foundClear filters
C#Files & paths

Read a text file

Load a small text file into a C# string.

C#✓ Tested
JavaFiles & paths

Read a UTF-8 file

Read a small UTF-8 file into a Java string.

Java✓ Tested
JavaScriptFiles & async

Read a UTF-8 file

Read a small file as text using Node.js.

JavaScript✓ Tested
PowerShellFiles & paths

Read a whole text file

Load text as one string instead of one item per line.

Get-Content✓ Tested
RustFiles & paths

Read buffered lines from a file

Read buffered lines from a file in a complete Rust program using the standard library.

Rust✓ Tested
CFile positioning & lifecycle

Read bytes from a chosen file offset

C: Check fseek before reading so an unsupported or invalid seek is not ignored.

C✓ Tested
GitCommit history & revision selection

Read commit subjects affecting one file

Git: Place the path after -- so Git limits history to the selected file.

Git✓ Tested
RustFiles & paths

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
Bash ScriptsInput streams & redirection

Read from a dedicated file descriptor

Bash Scripts: An explicitly opened descriptor keeps the script’s ordinary standard input available.

Bash Scripts✓ Tested
GoFiles & paths

Read from an in-memory filesystem

Read from an in-memory filesystem using a complete Go program with explicit sample inputs.

Go✓ Tested
Bash ScriptsInput streams & redirection

Read null-delimited filenames into an array

Bash Scripts: A null delimiter preserves spaces and embedded newlines in filenames.

Bash Scripts✓ Tested
Linux CommandsArchive integrity & packaging

Read one archived file to standard output

Linux Commands: Use tar -O with an explicit member name instead of writing files to disk.

Linux Commands✓ Tested