Create a directory

Discussion in 'Ruby' started by arose, Jun 10, 2006.

  1. arose

    arose Guest

    What would the code be to create a directory?

    I've tried Dir::new and Dir::eek:pen and googling around, but not finding
    it.
     
    arose, Jun 10, 2006
    #1
    1. Advertising

  2. arose

    arose Guest

    arose wrote:
    > What would the code be to create a directory?
    >
    > I've tried Dir::new and Dir::eek: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?
     
    arose, Jun 10, 2006
    #2
    1. Advertising

  3. arose

    arose Guest

    arose wrote:
    > arose wrote:
    > > What would the code be to create a directory?
    > >
    > > I've tried Dir::new and Dir::eek: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")
     
    arose, Jun 10, 2006
    #3
  4. arose

    Drew Guest

    arose wrote:
    > What would the code be to create a directory?
    >
    > I've tried Dir::new and Dir::eek: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
     
    Drew, Jun 10, 2006
    #4
  5. arose <> wrote:
    >
    > arose wrote:
    > > What would the code be to create a directory?
    > >
    > > I've tried Dir::new and Dir::eek: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
     
    Martin DeMello, Jun 12, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TJS
    Replies:
    1
    Views:
    525
    Eliyahu Goldin
    Jun 23, 2004
  2. Jack Wright
    Replies:
    1
    Views:
    477
    sonikchopra
    Apr 19, 2005
  3. =?Utf-8?B?QmFzIEhlbmRyaWtz?=

    Directory and files names in temporary asp.net directory

    =?Utf-8?B?QmFzIEhlbmRyaWtz?=, Jan 28, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    853
    Juan T. Llibre
    Jan 31, 2005
  4. Steve Singer
    Replies:
    0
    Views:
    551
    Steve Singer
    Feb 15, 2005
  5. davidw
    Replies:
    2
    Views:
    557
    Brock Allen
    May 30, 2005
Loading...

Share This Page