Results for “File operations & integrity”
Small, practical examples. Search by task or narrow things down below.
Preserve map insertion order
Java: Use LinkedHashMap when iteration should follow the order keys were first added.
Java✓ Tested
Provide a default environment value
Set a runtime default that can be overridden at startup.
Dockerfile✓ Tested
Read a stream again from its beginning
C: rewind returns a seekable stream to offset zero and clears its error and EOF indicators.
C✓ Tested
Read an ISO-style weekday number
JavaScript: Convert Sunday from zero to seven when using Monday-through-Sunday numbering.
JavaScript✓ Tested
Read an ISO-style weekday number
TypeScript: Convert Sunday from zero to seven when using Monday-through-Sunday numbering.
TypeScript✓ Tested
Read an optional associative-array entry
Bash Scripts: Use a fallback expansion when a map key may not be present under nounset.
Bash Scripts✓ Tested
Read characters without confusing EOF with a byte
C: Store fgetc in int so every unsigned-char value remains distinguishable from EOF.
C✓ Tested
Read complete lines into an array
Bash Scripts: Mapfile with -t removes each line terminator but preserves other whitespace.
Bash Scripts✓ Tested
Read concatenated gzip members
Linux Commands: GNU gzip decompresses concatenated gzip members in order.
Linux Commands✓ Tested
Read date components in UTC
JavaScript: UTC accessors avoid differences caused by the machine’s local timezone.
JavaScript✓ Tested
Read date components in UTC
TypeScript: UTC accessors avoid differences caused by the machine’s local timezone.
TypeScript✓ Tested
Read history for one path
Git: Read history for one path inside the disposable repository created by the input setup.
Git✓ Tested