Esempio n. 1
0
 def _delete_files(self, list):
     sw = safe_write()
     ret = True
     for file in list:
         if not sw.unlink(file):
             warn(self, "Cannot delete file: " + file)
             ret = False
     return ret
Esempio n. 2
0
 def delete_all_data(self):
     cache = qobuz.path.cache
     if not self._cache_path_exists(cache):
         return False
     list = []
     self._delete_subdir_data(cache, list)
     sw = safe_write()
     for f in list:
         sw.unlink(f)
Esempio n. 3
0
 def delete(self, path):
     if not os.path.exists(path):
         return False
     sw = safe_write()
     info(self, "Unlinking " + path)
     return sw.unlink(path)