Create a file: Difference between revisions
Content added Content deleted
(Added Wren) |
|||
Line 2,287: | Line 2,287: | ||
{{omit from|SmileBASIC|Filesystem has no directories, only projects which cannot be manipulated by code.}} |
{{omit from|SmileBASIC|Filesystem has no directories, only projects which cannot be manipulated by code.}} |
||
=={{header|Wren}}== |
|||
To create a file in the root, assuming you have the necessary privileges, just change "output.txt" |
|||
to "/output.txt" in the following script. |
|||
Wren does not currently support the creation of directories. |
|||
<lang ecmascript>import "io" for File |
|||
// file is closed automatically after creation |
|||
File.create("output.txt") {} |
|||
// check size |
|||
System.print("%(File.size("output.txt")) bytes")</lang> |
|||
{{out}} |
|||
<pre> |
|||
0 bytes |
|||
</pre> |
|||
=={{header|X86 Assembly}}== |
=={{header|X86 Assembly}}== |