1
0
Fork 0
forked from len0rd/rockbox

Added remove()

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2801 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Björn Stenberg 2002-11-01 15:26:06 +00:00
parent 54d5e2cb27
commit 307f5d846e
6 changed files with 57 additions and 18 deletions

View file

@ -184,6 +184,20 @@ int close(int fd)
return rc;
}
int remove(const char* name)
{
int rc;
int fd = open(name, O_WRONLY);
if ( fd < 0 )
return fd;
rc = fat_remove(&(openfiles[fd].fatfile));
close(fd);
return rc;
}
static int readwrite(int fd, void* buf, int count, bool write)
{
int sectors;