Ruby on Rails
Wednesday, October 24, 2018
You could use one of the shell commands [1] which will give you back the directory listing direct to your code. No need for an intermediate file.
However, if you google for
ruby directory listing
it will show you much better ways. Usually google will be much quicker for asking such questions than here.
Colin
On Wed, 24 Oct 2018 at 15:42, fugee ohu <fugee279@gmail.com> wrote:
I wanna copy directory listings from removable media to a database so then I'll know what files are on what removable disk I'm thinking at the system level i have to list the directory to a file and then open the file for reading in ruby and then use the split function to parse each line as I iterate through Before I go ahead and do this is there another way?--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/667c62e3-d949-4710-ad30-8d4f9af5ac55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLvGZRxPL%2Byrt3suyzD3qT-uL9S%3DbUPh6%3DAfoWOmJZAu8w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment