close()
public
Closes the directory stream. Any further attempts to access dir
will raise an IOError.
d = Dir.new("testdir")
d.close
Show source
/*
* 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;
}