Delete a file: Difference between revisions
Content deleted Content added
m →{{header|Wren}}: Changed to Wren S/H |
Add ed example |
||
Line 598:
<file:///input.txt>.delete(null)
<file:///docs>.delete(null)</syntaxhighlight>
=={{header|ed}}==
<syntaxhighlight lang="sed">
# by Artyom Bologov
# Write nothing to the file.
# That's the best one can do with ed native APIs.
,d
w input.txt
# Invoking the shell.
# More reliable but surrendering to the OS.
!rm input.txt
!rm -r docs/
!rm /input.txt
!rm -r /docs/
Q
</syntaxhighlight>
=={{header|Elena}}==
|