From b80ec63f537afa9a2ac39a86a4db8e9a03128e10 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 29 Jul 2022 15:58:37 +0300 Subject: [PATCH] notes... Signed-off-by: Alex A. Naanou --- pwiki2.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pwiki2.js b/pwiki2.js index ae9df65..1e83f54 100755 --- a/pwiki2.js +++ b/pwiki2.js @@ -763,15 +763,21 @@ module.FileStore = { : fs.readFileSync(p).toString(), } }, // XXX handle writing to directories... + // i.e. write to "./"+ this.__directory_text__ + // XXX would need to convert a file to a dir if writing to sub-path... + // XXX recursively create all dirs... // XXX do we write all the data or only the .text??? __update__: async function(path, data, mode='update'){ var p = module.path.join(this.__path__, path) + var f = await fs.promises.open(p, 'w') var size = await f.writeFile(data.text) f.close() // XXX check size... // XXX }, + // XXX remove empty dirs (???) + // XXX convert a dir to a file if removing last sub-file/dir... __delete__: async function(path){ var p = module.path.join(this.__path__, path) // XXX