ontent
“w” → write mode (creates file if not exist).
File.read → reads entire file content.
Output in console:
Hello Ruby File!
And file test.txt is created with that text.
ontent
“w” → write mode (creates file if not exist).
File.read → reads entire file content.
Output in console:
Hello Ruby File!
And file test.txt is created with that text.
Leave a Reply