This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
RE: remove() only works on files
- From: "Schwarz, Konrad" <konrad dot schwarz at siemens dot com>
- To: "David A. Ramos" <daramos at stanford dot edu>, "newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Fri, 15 Apr 2011 13:16:44 +0200
- Subject: RE: remove() only works on files
- References: <6768FACC-7932-483F-9C48-A1D2E63E410A@stanford.edu>
> -----Original Message-----
> From: newlib-owner@sourceware.org
> [mailto:newlib-owner@sourceware.org] On Behalf Of David A. Ramos
> Sent: Friday, April 15, 2011 9:10 AM
> To: newlib@sourceware.org
> Subject: Bug: remove() only works on files
> My understanding of ISO C's remove() function is that it
> should work for both files and directories. That is, it
> should call unlink() or rmdir(), respectively. However, the
> code in newlib/libc/stdio/remove.c just forwards the call to
> unlink(), which fails for directories.
Standard C's library does not know about heirarchical file systems
-- there is no way of creating, deleting, or listing directories.
remove() is specified only for files.
Konrad