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
TypeScriptUTC date operations

Construct a date from Unix seconds

TypeScript: Multiply seconds by 1000 before creating a Date.

TypeScript✓ Tested
JavaScriptUTC date operations

Convert epoch milliseconds to whole seconds

JavaScript: JavaScript Date stores milliseconds while many APIs use Unix seconds.

JavaScript✓ Tested
TypeScriptUTC date operations

Convert epoch milliseconds to whole seconds

TypeScript: JavaScript Date stores milliseconds while many APIs use Unix seconds.

TypeScript✓ Tested
Linux CommandsFiles & permissions

Copy a directory while preserving attributes

Linux Commands: Use cp -a for a recursive local copy that preserves links and ordinary file attributes.

Linux Commands✓ Tested
Docker / ComposeDockerfile patterns

Copy a directory’s contents into an image

Docker / Compose: A directory COPY includes its children at the destination.

Docker / Compose✓ Tested
GoFiles & paths

Copy a stream and count its bytes

Copy a stream and count its bytes using a complete Go program with explicit sample inputs.

Go✓ Tested
Bash ScriptsArray operations

Copy an array independently

Bash Scripts: A new array assignment copies element values rather than creating a shared reference.

Bash Scripts✓ Tested
Docker / ComposeDockerfile patterns

Copy an artifact from an earlier build stage

Docker / Compose: A named stage can produce an artifact without copying its other files.

Docker / Compose✓ Tested
SQLBulk changes & set operations

Copy selected rows into another table

SQL: INSERT SELECT performs a set-based copy with an explicit destination column list.

SQL✓ Tested
SQL ServerBulk changes & set operations

Copy selected rows into another table

SQL Server: INSERT SELECT performs a set-based copy with an explicit destination column list.

SQL Server✓ Tested
PostgresBulk changes & set operations

Copy selected rows into another table

Postgres: INSERT SELECT performs a set-based copy with an explicit destination column list.

Postgres✓ Tested
SQLiteBulk changes & set operations

Copy selected rows into another table

SQLite: INSERT SELECT performs a set-based copy with an explicit destination column list.

SQLite✓ Tested