FIND YOUR NEXT FEW LINES

Results for “Execution & file transfer”

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

848 snippets foundClear filters
JavaFile operations & binary data

Delete a known temporary file if present

Java: deleteIfExists returns whether a file was removed and still reports other I/O errors.

Java✓ Tested
C++Filesystem operations

Delete one known scratch file

C++: filesystem::remove reports whether an item was removed and also supports empty directories.

C++✓ Tested
PowerShellFile operations & integrity

Delete only a named scratch file

PowerShell: Use LiteralPath and avoid recursive removal for a single known file.

PowerShell✓ Tested
GitRestoring & revising local work

Discard an unstaged edit to one tracked file

Git: Restore copies the index version back into the selected working file.

Git✓ Tested
AngularAccessibility & reusable patterns

Display untrusted-looking text without HTML execution

Display untrusted-looking text without HTML execution with a standalone Angular component and explicit browser behavior.

Angular✓ Tested
PowerShellFile operations & integrity

Distinguish a file from a directory

PowerShell: Test-Path can constrain the kind of item that is accepted.

PowerShell✓ Tested
Linux CommandsStreams & byte tools

Encode and decode a file with Base64

Linux Commands: Use GNU base64 for text transport of bytes and --decode for the reverse operation.

Linux Commands✓ Tested
C#File operations & paths

Enumerate matching files recursively

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

C#✓ Tested
Docker / ComposeDockerfile patterns

Exclude files from the build context

Docker / Compose: A dockerignore file prevents selected local files from being copied.

Docker / Compose✓ 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
GitInspecting the working tree

Explain which ignore rule matches a file

Git: check-ignore -v reports the source file, line, pattern, and matched path.

Git✓ Tested
Docker / ComposeImage management

Export a container filesystem into a new image

Docker / Compose: export contains filesystem data; import creates a new image from it.

Docker / Compose✓ Tested