Results for “close”
Small, practical examples. Search by task or narrow things down below.
List regular files
List immediate regular files in sorted order and close the Java directory stream.
Java✓ Tested
Read a text file
Open a UTF-8 text file and read its contents. A context manager closes the file automatically, even if reading fails.
file✓ Tested
Return a value from a dialog form
HTML: A form with method dialog closes its containing dialog without a network submission.
HTML✓ Tested
Use an automatically removed temporary file
C: tmpfile creates a binary update stream whose file is removed when closed.
C✓ Tested
Visit files recursively
Java: Close the stream returned by Files.walk and sort relative paths for stable output.
Java✓ Tested
Write a text file
Save a string to a UTF-8 text file and close the file automatically when the write finishes.
file✓ Tested
Write a text file
Write and close a C++ output file while checking stream failure.
C++✓ Tested
Write a text file
Open, write, and close a C file while checking every operation.
C✓ Tested
Write several messages through one file descriptor
Bash Scripts: Open a destination once and close the descriptor after writing.
Bash Scripts✓ Tested