> 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.
File.directory?(".")
-------------------------------------------------------------
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 value
of File::umask, and are ignored on NT. Raises a SystemCallError if the
directory cannot be created. See also the discussion of permissions in the
class documentation for File.
-------------------------------------------------------------
-philip
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---