Paul Eggert wrote: > I installed this, imported from coreutils. It addresses the issue > that `unlink ("directory")' works on some hosts (e.g., Solaris, > OpenBSD) but not others (e.g., GNU/Linux, FreeBSD). Solaris 10 has a > new wrinkle: you can add/remove the privilege of unlinking a > directory.
Is it useful to have this in gnulib? POSIX has a function for removing directories: rmdir(). http://www.opengroup.org/onlinepubs/009695399/functions/rmdir.html This function is portable. It does not require privileges (other than those mandated by the directory and its parent directory). It does not leave garbage on the filesystem. Reading the comments in http://savannah.gnu.org/cgi-bin/viewcvs/coreutils/coreutils/src/remove.c?rev=1.126&content-type=text/vnd.viewcvs-markup it seems that the only use of this function is to speed up the removal of a non-empty directory. Why not add to gnulib a module with a function rmdir_recursive() instead? This function would remove a directory, including its contents. Bruno _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib