2 * This file is part of WolneLektury-Mobile, licensed under GNU Affero GPLv3 or later.
3 * Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
8 * @return Object literal singleton instance of AssetCopy
12 * @param asset Path to the asset (relative to assets dir)
13 * @param target Path to DB file (relative to app db files dir)
15 * @param win Success callback
16 * @param fail Error callback
18 copy: function(asset, target, overwrite, win, fail) {
19 if(overwrite==false) overwrite="false";
20 else overwrite="true";
21 PhoneGap.exec(win, fail, "AssetCopy", "copy", [asset, target, overwrite]);