From 6d3decbba58258f01bcbd2a765334aa9759b4e81 Mon Sep 17 00:00:00 2001 From: Benedictus Alvian Sofjan Date: Wed, 20 May 2026 15:53:22 +0100 Subject: [PATCH 1/2] Add anymaputils --- code/common/anymaputils.q | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 code/common/anymaputils.q diff --git a/code/common/anymaputils.q b/code/common/anymaputils.q new file mode 100644 index 000000000..f391a09fa --- /dev/null +++ b/code/common/anymaputils.q @@ -0,0 +1,5 @@ +.anymap.writeToAnyMap:{[data;filePath] (hsym filePath) 1: data; :(::)} +.anymap.deriveAnymapFiles:{[filePath] strPath: string[filePath]; `$(strPath;strPath,"#";strPath,"##")} +.anymap.util.copyAnyMap:{[fromFilePath; destFilePath] fromFilePaths:.anymap.deriveAnymapFiles[fromFilePath]; system (("cp "," " sv string fromFilePaths), " ", string destFilePath)} +.anymap.util.removeAnyMap:{[filePath] filePaths:.anymap.deriveAnymapFiles[filePath]; system ("rm "," " sv string filePaths)} +.anymap.util.moveAnyMap:{[fromFilePath; destFilePath] fromFilePaths:.anymap.deriveAnymapFiles[fromFilePath]; system (("mv "," " sv string fromFilePaths), " ", string destFilePath)} \ No newline at end of file From 5721d8153d68d0eab1939f9cb40429635c5f18a7 Mon Sep 17 00:00:00 2001 From: bsofjan Date: Wed, 15 Jul 2026 09:11:05 +0100 Subject: [PATCH 2/2] Update anymaputils.q --- code/common/anymaputils.q | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/common/anymaputils.q b/code/common/anymaputils.q index f391a09fa..fd03ff378 100644 --- a/code/common/anymaputils.q +++ b/code/common/anymaputils.q @@ -1,5 +1,5 @@ -.anymap.writeToAnyMap:{[data;filePath] (hsym filePath) 1: data; :(::)} -.anymap.deriveAnymapFiles:{[filePath] strPath: string[filePath]; `$(strPath;strPath,"#";strPath,"##")} -.anymap.util.copyAnyMap:{[fromFilePath; destFilePath] fromFilePaths:.anymap.deriveAnymapFiles[fromFilePath]; system (("cp "," " sv string fromFilePaths), " ", string destFilePath)} -.anymap.util.removeAnyMap:{[filePath] filePaths:.anymap.deriveAnymapFiles[filePath]; system ("rm "," " sv string filePaths)} -.anymap.util.moveAnyMap:{[fromFilePath; destFilePath] fromFilePaths:.anymap.deriveAnymapFiles[fromFilePath]; system (("mv "," " sv string fromFilePaths), " ", string destFilePath)} \ No newline at end of file +.anymap.writetoanymap:{[filepath;data] (hsym filepath) 1: data; :(::)} +.anymap.deriveanymapfiles:{[filepath] `$string[filepath],/:("";"#";"##")} +.anymap.util.copyanymap:{[fromfilepath; destfilepath] fromfilepaths:.anymap.deriveanymapfiles[fromfilepath]; .os.cpy[;destfilepath] each fromfilepaths)} +.anymap.util.removeanymap:{[filepath] filepaths:.anymap.deriveanymapfiles[filepath]; .os.del each filepaths)} +.anymap.util.moveanymap:{[fromfilepath; destfilepath] fromfilepaths:.anymap.deriveanymapfiles[fromfilepath]; .os.ren[;destfilepath] each fromfilepaths)}