Hello. I have a question regarding Files and Directories. I have a
class method that opens a directory and reads the contents. What is the
most efficient way to test whether an entry is a directory or a file?
Also, the purpose of this program is to read through a tree directory
structure and turn the directory names into database entries. Any
suggestions on how to make a complete spider that utilizes Ruby’s
specialties?
Hello. I have a question regarding Files and Directories. I have a
class method that opens a directory and reads the contents. What is the
most efficient way to test whether an entry is a directory or a file?
File.directory? path
File.file? path
Also, the purpose of this program is to read through a tree directory
structure and turn the directory names into database entries. Any
suggestions on how to make a complete spider that utilizes Ruby’s
specialties?
Also, the purpose of this program is to read through a tree directory
structure and turn the directory names into database entries. Any
suggestions on how to make a complete spider that utilizes Ruby’s
specialties?
If you are on a *ix box you can create your dir/file database getting
the friendly output of ‘du -a /mypath > somefile’ …size are also
included.
-r.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.