Method: Dir.unlink
- Defined in:
- dir.c
.delete(string) ⇒ 0 .rmdir(string) ⇒ 0 .unlink(string) ⇒ 0
Deletes the named directory. Raises a subclass of SystemCallError if the directory isn’t empty.
1003 1004 1005 1006 1007 1008 1009 1010 1011 |
# File 'dir.c', line 1003
static VALUE
dir_s_rmdir(VALUE obj, VALUE dir)
{
check_dirname(&dir);
if (rmdir(RSTRING_PTR(dir)) < 0)
rb_sys_fail_path(dir);
return INT2FIX(0);
}
|