FIND YOUR NEXT FEW LINES

Results for “file count”

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

1005 snippets foundClear filters
Linux CommandsGetting Started

Create an empty practice file

Linux Commands: Create an empty practice file using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
JavaFile operations & binary data

Create and clean up a temporary file

Java: Create a unique file and remove it in finally even when the operation fails.

Java✓ Tested
GoFiles & paths

Create and clean up a temporary file

Create and clean up a temporary file using a complete Go program with explicit sample inputs.

Go✓ Tested
Linux CommandsFiles & permissions

Create private files with a restrictive umask

Linux Commands: Apply umask in a subshell so the surrounding shell is unaffected.

Linux Commands✓ Tested
GitTags & repository configuration

Declare LF normalization for a file type

Git: A gitattributes rule records text normalization expectations for matching paths.

Git✓ Tested
C#File operations & paths

Delete a known scratch file

C#: File.Delete ignores a missing file but still throws for other I/O failures.

C#✓ Tested
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
PowerShellFile operations & integrity

Distinguish a file from a directory

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

PowerShell✓ Tested
SQLReporting & grouped calculations

Distinguish row count from non-null value count

SQL: COUNT(*) includes every row while COUNT(column) skips NULL values.

SQL✓ Tested