FIND YOUR NEXT FEW LINES

Results for “Files & permissions”

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

380 snippets foundClear filters
GoFiles & paths

Create nested directories

Create nested directories using a complete Go program with explicit sample inputs.

Go✓ 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
Linux CommandsFinding & selecting files

Exclude a directory from a recursive search

Linux Commands: Use prune to avoid descending into generated dependencies.

Linux Commands✓ Tested
Linux CommandsFinding & selecting files

Extract a filename from a path

Linux Commands: Use basename with an explicit suffix when removing a known extension.

Linux Commands✓ Tested
Linux CommandsFinding & selecting files

Extract a parent directory from a path

Linux Commands: Use dirname without needing the path to exist.

Linux Commands✓ Tested
C++Filesystem operations

Handle a failed file open through stream state

C++: An unopened input stream is not an empty successful file read.

C++✓ Tested
RustFiles & paths

Inspect a path’s filename and extension

Inspect a path’s filename and extension in a complete Rust program using the standard library.

Rust✓ Tested
Docker / ComposeExecution & file transfer

Inspect changes to a container’s writable layer

Docker / Compose: diff marks added, changed, and deleted filesystem paths.

Docker / Compose✓ Tested
GoFiles & paths

Join portable path components

Join portable path components using a complete Go program with explicit sample inputs.

Go✓ Tested
Linux CommandsFinding & selecting files

Limit a search to the immediate directory

Linux Commands: Use maxdepth with type f to exclude nested files and directories.

Linux Commands✓ Tested
GitGetting Started

List paths saved in the latest commit

Git: List paths saved in the latest commit inside the disposable repository created by the input setup.

Git✓ Tested
Linux CommandsFinding & selecting files

Match filenames without case sensitivity

Linux Commands: Use iname for a case-insensitive filename pattern.

Linux Commands✓ Tested