Jump to content

Read entire file: Difference between revisions

Added Quackery.
m (→‎{{header|Lasso}}: fix irregular markup)
(Added Quackery.)
Line 1,623:
any_string = Path(filename).read_text(encoding='utf-8')
any_binary_data = Path(filename).read_bytes()</lang>
 
=={{header|Quackery}}==
 
<code>sharefile</code> takes a file name in a string as an argument, appends a file path if there is one on the ancillary stack <code>filepath</code>, and returns the contents of the file as a string, and <code>1</code> (i.e. true) if the file exists. If the file does not exist it returns the name of the file and <code>0</code> (i.e. false).
 
<lang Quackery>$ "myfile.txt" sharefile</lang>
 
=={{header|Q}}==
1,462

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.