does any one have tried to create a folder from a ROR command.
in my application i want to check weather their is existing folder with
a given name and if it does not exists to make a new folder.
is some one have tried this pls tell me how to achieve this
See the ruby docs, in particular the File and Dir class.
File.directory?(file_name) => true or false
Returns true if the named file is a directory, false otherwise.
Dir.mkdir( string [, integer] ) => 0
Makes a new directory named by string, with permissions specified by the
optional parameter anInteger. The permissions may be modified by the
of File::umask, and are ignored on NT. Raises a SystemCallError if the
directory cannot be created. See also the discussion of permissions in
class documentation for File.