Questions Concepts
GitHub icon

Disk Output

Disk Output - language feature

< >
Example from Python, Cython:
with open('helloworld.txt', 'w') as filehandle: filehandle.write('Hello, world!\n')
Example from Node.js:
require("fs").writeFileSync("foo.txt", "foo", "utf8")
Example from Elixir:
File.write!("helloworld.txt", "Hello, world!\n")
Example from REBOL, Boron:
write %helloworld.txt "Hello, world!^/"
Example from Speedie:
"helloworld.txt" <~ "Hello, world!\n"
Example from Jule:
use std::fs::{open, O_WRONLY} fn main() { let (mut f, _) = open("myfile.txt", O_WRONLY, 0) let bytes = ([]byte)("Text to write") f.write(bytes) f.close() }

Languages with Disk Output include Python, Node.js, Elixir, REBOL, Cython, Speedie, Jule, Boron

Languages without Disk Output include XML, JSON, CSS, HAML, JSON5, Ion, JSONiq, JSON with Comments, Superjson, Jsonnet, Hocon

This question asks: Does this language have methods or standard libraries for writing to disk?

HTML of this page generated by Features.ts

View source

- Build the next great programming language Search Add Language Features Creators Resources About Blog Acknowledgements Queries Stats Sponsor Traffic Traffic Today Day 305 Logout