Results for “File operations & binary data”
Small, practical examples. Search by task or narrow things down below.
Read elements from trusted XML
Python: Use ElementTree to inspect a small trusted XML document.
Python✓ Tested
Read history for one path
Git: Read history for one path inside the disposable repository created by the input setup.
Git✓ Tested
Read one JSON document per line
Python: Parse nonempty JSON Lines records independently instead of loading a JSON array.
Python✓ Tested
Read text line by line
Read text line by line using a complete Go program with explicit sample inputs.
Go✓ Tested
Read the target stored in a symbolic link
Linux Commands: Use readlink without resolving the target path.
Linux Commands✓ Tested
Register cleanup through DestroyRef
Register cleanup through DestroyRef with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Reject an escaping relative path
Reject an escaping relative path using a complete Go program with explicit sample inputs.
Go✓ Tested
Remove an empty directory only
Linux Commands: Use rmdir so a directory containing files cannot be removed accidentally.
Linux Commands✓ Tested
Remove an indexed element and compact the array
Bash Scripts: Unsetting an element leaves a gap; reassigning the values creates consecutive indices.
Bash Scripts✓ Tested
Remove collection items that satisfy a condition
Java: Use removeIf on a mutable collection to avoid changing it manually inside a for-each loop.
Java✓ Tested
Remove matching items from a mutable list
C#: List.RemoveAll returns how many items it removed.
C#✓ Tested
Render an observable with AsyncPipe
Render an observable with AsyncPipe with a standalone Angular component and explicit browser behavior.
Angular✓ Tested