working on file store cleanup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2022-07-31 11:33:26 +03:00
parent 3a8763c817
commit db57070cfb

View File

@ -925,11 +925,18 @@ async function(base, sub, options={index: '.index'}){
levels.pop() }
return target }
// XXX cleanup all sub-paths...
// - remove empty leaf dirs
// - dir -> file ???
var cleanup =
module.cleanup =
async function(base){
async function(base, options={index: '.index'}){
glob(module.path.join(base, '**/*'))
.on('end', function(paths){
paths
.sort(function(a, b){
return b.length - a.length })
// XXX
}
}) }
// XXX add a lock file and prevent multiple adapters from controlling