mirror of https://github.com/koreader/koreader
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
296 B
Lua
15 lines
296 B
Lua
9 years ago
|
-- need low-level mechnism to detect android to avoid recursive dependency
|
||
|
local isAndroid = pcall(require, "android")
|
||
|
|
||
|
local DataStorage = {}
|
||
|
|
||
|
function DataStorage:getDataDir()
|
||
|
if isAndroid then
|
||
|
return "/sdcard/koreader/"
|
||
|
else
|
||
|
return "./"
|
||
|
end
|
||
|
end
|
||
|
|
||
|
return DataStorage
|