RE: Easy Coding: Ruby File I/O

You are viewing a single comment's thread from:

Easy Coding: Ruby File I/O

in ruby •  7 years ago 

just want to add on r+, w+ and a+:

r+: will open a file for both reading and writing -- file must exist
w+: will create an empty file for both reading and writing
a+: will open file for reading and appending -- file is created if it does not exist

thanks @privateger

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thanks for your comment!
I have only just now seen it :)