Rockbox mail archiveSubject: need a function to delete an (empty) directory
need a function to delete an (empty) directory
From: [IDC]Dragon <idc-dragon_at_gmx.de>
Date: Thu, 8 Apr 2004 13:32:46 +0200 (MEST)
I've added the On+Play functionality to recursively delete a directory. When
I was done with it I realized that our remove() function doesn't work on
directories. It internally calls open(), which explicitely checks for the dir
attribute and fails with return code -8.
Does somebody have a rmdir function "in the drawer", or have I overlooked a
Directories are in principle ordinary files, but from a collegue I learned
that because of a bug(?) from Microsoft they always have zero size and the
true size needs to be determined by the FAT. Hmm, maybe we don't need to find
out if we're just deleting it.
I don't feel like messing around in that part of the code, would welcome
Nevertheless I have committed the feature, with the actual directory
deletion commented out. So, for the time being it deletes all files within the tree,
but leaves the directory stucture remaining.
-- NEU : GMX Internet.FreeDSL Ab sofort DSL-Tarif ohne Grundgebühr: http://www.gmx.net/info _______________________________________________ http://cool.haxx.se/mailman/listinfo/rockboxReceived on 2004-04-08
Page was last modified "Sat May 23 08:12:40 2020" The Rockbox Crew