Read entire file: Difference between revisions
Added Quackery.
Thundergnat (talk | contribs) 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}}==
|