FIND YOUR NEXT FEW LINES

Results for “Files & paths”

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

495 snippets foundClear filters
GitStashing selected work

Read stash labels without commit hashes

Git: A custom format provides predictable stash subjects.

Git✓ Tested
CFiles

Read text in bounded chunks

Read a C text file with fgets and a fixed buffer.

C✓ Tested
GitBranches & ancestry

Read the current branch name

Git: show-current returns an empty string when HEAD is detached.

Git✓ Tested
GitInspecting the working tree

Read the exact version currently staged

Git: The colon path syntax reads a blob from the index rather than from HEAD or the working file.

Git✓ Tested
PowerShellCommands & execution context

Read the kind of command being invoked

PowerShell: CommandType distinguishes cmdlets from functions, aliases, and external applications.

PowerShell✓ Tested
PowerShellArray operations

Read the last array element

PowerShell: A negative array index counts backward from the end.

PowerShell✓ Tested
GitGetting Started

Read the latest commit message

Git: Read the latest commit message inside the disposable repository created by the input setup.

Git✓ Tested
GitRemotes & additional checkouts

Read the upstream tracked by the current branch

Git: The upstream shorthand resolves the configured remote-tracking branch.

Git✓ Tested
GitGetting Started

Recognize an untracked file

Git: Recognize an untracked file inside the disposable repository created by the input setup.

Git✓ Tested
PowerShellDates & numeric validation

Reject NaN and infinite values

PowerShell: Double.IsFinite excludes numeric values unsuitable for ordinary bounded calculations.

PowerShell✓ Tested
PowerShellHashtables & object records

Remove an optional hashtable entry

PowerShell: Remove changes the map in place without changing unrelated entries.

PowerShell✓ Tested
Docker / ComposeNetworks & volume metadata

Remove one network attachment

Docker / Compose: network disconnect removes the specified attachment while retaining the container.

Docker / Compose✓ Tested