File input/output: Difference between revisions
Content added Content deleted
Line 1,832: | Line 1,832: | ||
FileUtils knows about IO.copy_stream; so if you use FileUtils, then your program uses IO.copy_stream with Ruby 1.9, but still works with older Ruby versions. |
FileUtils knows about IO.copy_stream; so if you use FileUtils, then your program uses IO.copy_stream with Ruby 1.9, but still works with older Ruby versions. |
||
=={{header|Run BASIC}}== |
|||
<lang runbasic>open "input.txt" for input as #in |
|||
fileLen = LOF(#in) 'Length Of File |
|||
fileData$ = input$(#in, fileLen) 'read entire file |
|||
close #in |
|||
open "output.txt" for output as #out |
|||
print #out, fileData$ |
|||
close #out |
|||
end</lang> |
|||
=={{header|Scala}}== |
=={{header|Scala}}== |