#!/usr/bin/env php . */ define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); $shortoptions = 'y'; $longoptions = array('yes'); $helptext = <<query($sql) !== false) { print " {$file->N} found.\n"; if ($file->N == 0) { exit(0); } } else { print "FAILED"; exit(1); } if (!have_option('y', 'yes')) { print "About to delete the entries along with locally stored files. Are you sure? [y/N] "; $response = fgets(STDIN); if (strtolower(trim($response)) != 'y') { print "Aborting.\n"; exit(0); } } print "\nDeleting: "; while ($file->fetch()) { try { $file->getPath(); $file->delete(); print 'x'; } catch (Exception $e) { // either FileNotFound exception or ClientException $file->delete(); print '.'; } } print "\nDONE.\n";