Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Create a directory

Reply
Thread Tools

Create a directory

 
 
arose
Guest
Posts: n/a
 
      06-10-2006
What would the code be to create a directory?

I've tried Dir::new and Dir:pen and googling around, but not finding
it.

 
Reply With Quote
 
 
 
 
arose
Guest
Posts: n/a
 
      06-10-2006

arose wrote:
> What would the code be to create a directory?
>
> I've tried Dir::new and Dir:pen and googling around, but not finding
> it.


Let me elaborate

Dir::new("test")

gives me a message that no such directory exists. I know that, that is
why I'm making it. What am i missing here?

 
Reply With Quote
 
 
 
 
arose
Guest
Posts: n/a
 
      06-10-2006

arose wrote:
> arose wrote:
> > What would the code be to create a directory?
> >
> > I've tried Dir::new and Dir:pen and googling around, but not finding
> > it.

>
> Let me elaborate
>
> Dir::new("test")
>
> gives me a message that no such directory exists. I know that, that is
> why I'm making it. What am i missing here?


nevermind i need

Dir::mkdir("test")

 
Reply With Quote
 
Drew
Guest
Posts: n/a
 
      06-10-2006

arose wrote:
> What would the code be to create a directory?
>
> I've tried Dir::new and Dir:pen and googling around, but not finding
> it.


Dir::mkdir

Here's the rest of the class:
http://www.rubycentral.com/book/ref_c_dir.html

 
Reply With Quote
 
Martin DeMello
Guest
Posts: n/a
 
      06-12-2006
arose <> wrote:
>
> arose wrote:
> > What would the code be to create a directory?
> >
> > I've tried Dir::new and Dir:pen and googling around, but not finding
> > it.

>
> Let me elaborate
>
> Dir::new("test")
>
> gives me a message that no such directory exists. I know that, that is
> why I'm making it. What am i missing here?


Just to clarify this, Dir::new makes a new ruby Dir object that wraps
access to an exsting filesystem directory. Dir::mkdir wraps the actual
filesystem 'create directory' call.

martin
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System.IO.Directory.GetDirectories() and System.IO.Directory.GetFiles() are not returning the specified directory Nathan Sokalski ASP .Net 2 09-06-2007 03:58 PM
Session is lost if a directory is created under virtual directory Jack Wright ASP .Net 1 04-19-2005 03:04 PM
Directory and files names in temporary asp.net directory =?Utf-8?B?QmFzIEhlbmRyaWtz?= ASP .Net 5 01-31-2005 01:56 PM
list all css files in a directory and sub directory TJS ASP .Net 1 06-23-2004 10:49 AM
question regarding overriding of web.config in the root directory..in a web app in a virtual directory dotnetprogram ASP .Net 1 12-27-2003 06:02 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57