IOYWCTDEHO4GHC777JYUODJSSHL2SJWYTUG5PQPZOG5HEVR6XXYQC
DRYBR6MIVT6MQEI4B6GJMOY4WRZ42ALNWO4BEVMUBP4GV326KOHQC
EGS44RTAG7JVLLEA4KH63MBZAD4O5HNRSJQIOC6SRKHUG3G56R6QC
OTIBCAUJ3KDQJLVDN3A536DLZGNRYMGJLORZVR3WLCGXGO6UGO6AC
R2DITAZZJNA3QJ3QQ3Y6FB6VNFRP5UXDMNJ64SRYVXDAN5PIPWUAC
R6L4RDWKYF7FOWXYKVRCX76GHVH74OQ6AAIZK3YLWDTDQ723FUOAC
SPNMXTYRSNPNQJNBTYDZSHYDZVZRPM4LI5QX7GR2TLTC6SPJX4DAC
VHQCNMARPMNBSIUFLJG7HVK4QGDNPCGNVFLHS3I4IGNVSV5MRLYQC
KXIWX3X5UH6PSNOYDBYBAHKQZAQJIDHNSDWSIZREGOE6HLS26DBQC
QYIFOHW3WDDQMK4ATY6IOSQRFHJOQ5QCPDKRC4GVGWLQEH4HGWVQC
AVTNUQYRBW7IX2YQ3KDLVQ23RGW3BAKTAE7P73ASBYNKOHMQMH5AC
3QNOKBFMKBGXBVJIRHR2444JRRMBTABHE4674NR3DT67RRM2X6GAC
function load_links(id)
local infile = App.open_for_reading(Directory..id..'.json')
if infile == nil then
return {}
end
return json.decode(infile:read('*a'))
end
function save_links(id)
local status = love.filesystem.createDirectory(Directory..dirname(id))
assert(status)
local links_filename = Directory..id..'.json'
local outfile = App.open_for_writing(links_filename)
if outfile == nil then
error('failed to write to "'..links_filename..'"')
end
outfile:write(json.encode(Cache[id].links))
outfile:write('\n')
outfile:close()
end