public Method

Dir.close

dir.close  nil

Closes the directory stream. Any further attempts to access dir will raise an IOError.

d = Dir.new("testdir")
d.close   #=> nil

Source Code

/*
*  call-seq:
*     dir.close => nil
*
*  Closes the directory stream. Any further attempts to access
*  <em>dir</em> will raise an <code>IOError</code>.
*
*     d = Dir.new("testdir")
*     d.close   #=> nil
*/
static VALUE
dir_close(dir)
   VALUE dir;
{
   struct dir_data *dirp;

   GetDIR(dir, dirp);
   closedir(dirp->dir);
   dirp->dir = NULL;

   return Qnil;
}
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.