FIND YOUR NEXT FEW LINES

Results for “File operations & integrity”

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

947 snippets foundClear filters
C#File operations & paths

Enumerate matching files recursively

C#: Sort relative filenames when reproducible traversal output is required.

C#✓ Tested
Linux CommandsArchive integrity & packaging

Exclude generated files from an archive

Linux Commands: Place exclude options before the input paths to control archive membership.

Linux Commands✓ Tested
PythonFile operations & archives

Extract filename components

Python: Use pathlib properties to separate a directory, filename stem, and suffix.

Python✓ Tested
PythonFile operations & archives

Find matching files recursively

Python: Use rglob and sorted relative paths for a reproducible recursive file listing.

Python✓ Tested
C++Filesystem operations

Handle a failed file open through stream state

C++: An unopened input stream is not an empty successful file read.

C++✓ Tested
PythonFile operations & archives

Hash a file without reading it all at once

Python: Feed fixed-size binary chunks into SHA-256 for files larger than memory.

Python✓ Tested
C#File operations & paths

Inspect a file length without reading it

C#: Use FileInfo.Length to retrieve a logical size in bytes.

C#✓ Tested
C++Filesystem operations

List regular files recursively in sorted order

C++: Collect relative paths before sorting because directory iteration order is unspecified.

C++✓ Tested
C#File operations & paths

Move a file to a new filename

C#: File.Move changes the file path without loading its contents.

C#✓ Tested
JavaFile operations & binary data

Move a file to a new name

Java: Files.move changes the path and returns the destination Path.

Java✓ Tested
C++Filesystem operations

Normalize a path without touching the filesystem

C++: lexically_normal removes redundant dot components using path syntax alone.

C++✓ Tested
C#File operations & paths

Process a file as a lazy line sequence

C#: ReadLines avoids allocating one string containing the entire file.

C#✓ Tested