In:
target = File.open(filename)
target.truncate(target.size)
What is the purpose of “target.size”? Does it return the size of the
file for instance? Should we always pass it to “truncate”, why?
Thanks.
In:
target = File.open(filename)
target.truncate(target.size)
What is the purpose of “target.size”? Does it return the size of the
file for instance? Should we always pass it to “truncate”, why?
Thanks.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs