FIND YOUR NEXT FEW LINES

Results for “open file”

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

1107 snippets foundClear filters
CFiles

Write a text file

Open, write, and close a C file while checking every operation.

C✓ Tested
JavaFiles & paths

Write a UTF-8 file

Write a Java string to a file using an explicit text encoding.

Java✓ Tested
Bash ScriptsInput streams & redirection

Write several messages through one file descriptor

Bash Scripts: Open a destination once and close the descriptor after writing.

Bash Scripts✓ Tested
Docker / ComposeExecution & file transfer

Pipe input into a container process

Docker / Compose: The interactive flag keeps standard input open without allocating a terminal.

Docker / Compose✓ Tested
PythonFile operations & archives

Read compressed text directly

Python: Open gzip data in text mode with an explicit encoding.

Python✓ Tested
JavaFiles & paths

Append a line

Append text to a Java file, creating it if necessary.

Java✓ Tested
jQueryDOM & classes

Append a list item

Build a jQuery element with text and append it safely.

jQuery✓ Tested
jQueryDOM & classes

Clear an element

Remove child content while keeping the jQuery-selected container.

jQuery✓ Tested
JavaFiles & paths

Create nested directories

Create missing parent directories with Java Files.createDirectories.

Java✓ Tested
jQueryText & attributes

Disable a button

Set the live disabled property with jQuery prop.

jQuery✓ Tested
jQueryTraversal & selection

Filter a selection

Reduce a jQuery selection to elements with a matching class.

jQuery✓ Tested
jQueryTraversal & selection

Find descendants

Select only matching descendants of a jQuery container.

jQuery✓ Tested