mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
add clear api for DocSettings
to remove both history settings and sidecar settings
This commit is contained in:
@@ -146,4 +146,13 @@ function DocSettings:close()
|
||||
self:flush()
|
||||
end
|
||||
|
||||
function DocSettings:clear()
|
||||
if self.history_file then
|
||||
os.remove(self.history_file)
|
||||
end
|
||||
if self.sidecar_file then
|
||||
os.remove(self.sidecar_file)
|
||||
end
|
||||
end
|
||||
|
||||
return DocSettings
|
||||
|
||||
Reference in New Issue
Block a user