Results for “directory”
Small, practical examples. Search by task or narrow things down below.
Create nested directories
Create a directory tree using the .NET Directory API.
C#✓ Tested
Create nested directories
Create missing parent directories with Java Files.createDirectories.
Java✓ Tested
Create nested directories
Create nested directories using a complete Go program with explicit sample inputs.
Go✓ Tested
Create nested directories
Use C++17 filesystem to create a directory tree.
C++✓ Tested
Create nested folders
Create a folder and any missing parent folders in one call. Running the code again is safe when the folder already exists.
directory✓ Tested
Distinguish a file from a directory
PowerShell: Test-Path can constrain the kind of item that is accepted.
PowerShell✓ Tested
Enter and leave a practice directory
Linux Commands: Enter and leave a practice directory using GNU/Linux commands in an empty practice directory.
Linux Commands✓ Tested
Exclude a directory from a recursive search
Linux Commands: Use prune to avoid descending into generated dependencies.
Linux Commands✓ Tested
Export committed files without the Git metadata directory
Git: Git archive creates a snapshot of tracked committed files only.
Git✓ Tested
Extract a parent directory from a path
Linux Commands: Use dirname without needing the path to exist.
Linux Commands✓ Tested
Limit a search to the immediate directory
Linux Commands: Use maxdepth with type f to exclude nested files and directories.
Linux Commands✓ Tested
List files in a folder
List the names of regular files in a folder in alphabetical order, excluding subdirectories.
directory✓ Tested